Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2016-02-21 04:13:11

SmittyW
Member
Joined: 2015-03-13
Posts: 2,085

[Question] How to connect without PlayerIO

^
I'm a bot nub and heard from Tomahawk some users that using a library is also nubish (I disagree), but I am curious to know how it's done and think that I can learn a trick or two.

Will it help? Is there already a guide somewhere? I don't know. Simply put, how do you do it?

Offline

#2 2016-02-21 04:18:51, last edited by lrussell (2016-02-22 21:36:48)

lrussell
Member
From: Saturn's Titan
Joined: 2015-02-15
Posts: 843
Website

Re: [Question] How to connect without PlayerIO

There's no point in not using PlayerIOClient, because using it to connect to PlayerIO makes perfect sense. If you don't have a specific reason not to use it (such as using a different programming language without it), then you should just use it. Either way you'll be using a library, just more general ones such as TcpListener.

Offline

#3 2016-02-21 05:36:54

Kaslai
Official Caroler
From: SEAͩT̓͑TLͯͥͧͪ̽ͧE͑̚
Joined: 2015-02-17
Posts: 787

Re: [Question] How to connect without PlayerIO

You can look up the EECloud PlayerIO implementation to find out how it's done. It's not too hard, but if you don't use the PlayerIO library, you'll just be using a networking library instead.

Offline

#4 2016-02-21 05:40:27

XxAtillaxX
Member
Joined: 2015-11-28
Posts: 4,202

Re: [Question] How to connect without PlayerIO

You can directly inject packets into the socket the packets are being sent and received from if you inject into a specific process, like the embedded client.
This is essentially how I achieved EEProxy, which I'm not going to be releasing because of incredibly messy code and convoluted.

Or, you can simply make your own miniature PlayerIOClient, which I've done as well with even worse sloppy coding.
Essentially all you need to do is handle the API requests, serialise and deserialise protocol buffer formats, and establish a socket on the endpoint you receive.
Once you do that, you just send a properly formatted join Message packet (see EEDecode for the Message class code) with an auth string that the API gives you.

Pretty much once that's all done, you can send and receive packets fairly easily.
Maybe one day I'll actually make it in clean code but it would be much better to write it from scratch.


signature.png
*u stinky*

Offline

#5 2016-02-21 14:06:26

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: [Question] How to connect without PlayerIO

There's nothing noobish about using a library. If the wheel has been invented, don't reinvent it, use code that is made to be used by others.
I personally like to write as much as I can myself, but doing stuff like PlayerIO myself is going too far if you'd ask me.

Offline

#6 2016-02-22 20:57:26

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,837

Re: [Question] How to connect without PlayerIO

SmittyW. wrote:

I'm a bot nub and heard from Tomahawk some users that using a library is also nubish

I stand by that. Good for you if you start with PIO client and not an EE sdk - that is, just as long as you don't start with a console bot.

den3107 wrote:

If the wheel has been invented, don't reinvent it

The wheel was invented: PlayerIOClient.dll. The other EE libraries are the reinventions.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#7 2016-02-22 21:01:37

Kaslai
Official Caroler
From: SEAͩT̓͑TLͯͥͧͪ̽ͧE͑̚
Joined: 2015-02-17
Posts: 787

Re: [Question] How to connect without PlayerIO

Don't get on his case about not wanting to use PlayerIOClient. If I was to make another big EE related project, I'd probably use C++, which isn't supported by PlayerIO, so I would have to roll my own anyway.

Offline

#8 2016-02-22 23:06:17

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: [Question] How to connect without PlayerIO

Tomahawk wrote:
den3107 wrote:

If the wheel has been invented, don't reinvent it

The wheel was invented: PlayerIOClient.dll. The other EE libraries are the reinventions.

That's exactly what I said.

Offline

Wooted by:
den31071456178777584580

Board footer

Powered by FluxBB

[ Started around 1714902962.4106 - Generated in 0.044 seconds, 12 queries executed - Memory usage: 1.45 MiB (Peak: 1.57 MiB) ]