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 Before February 2015

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

[Question] Use of Disconnect() and Logout()

Recently I "discovered" the Disconnect() and Logout() functions for connection and client respectively. I haven't seen these functions implemented before in a bot, sdk, or general application.

Is there any purpose for using Logout() rather than just exiting? Apparently Logout() clears the stored credentials, but that doesn't really help me. (I know Disconnect() allows one to reuse the client, without reconnecting to join another room).

Moreover, how long is the Client valid for if it isn't connected to a room? Is there a way to keep it alive?

Last edited by Hexagon (Jan 9 2015 8:15:01 pm)

Offline

#2 Before February 2015

Processor
Member
Joined: 2015-02-15
Posts: 2,209

Re: [Question] Use of Disconnect() and Logout()

Clients contain a token. In my tests, the tokens were valid for ~48 hours. I'm not sure if Logout() invalidates this token. This function is pretty new and didn't exist in the earlier versions of PlayerIOClient.

Disconnect() has always existed and is used by the ee swf when you press "Leave Room". I personally used it in my bots before, it is pretty useful.


I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.

Offline

#3 Before February 2015

Hexagon
Member
Joined: 2015-04-22
Posts: 1,213

Re: [Question] Use of Disconnect() and Logout()

Thanks processor! That clarifies my question a lot.

Offline

#4 Before February 2015

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

Re: [Question] Use of Disconnect() and Logout()

I'll just lock this then.


signature.png
*u stinky*

Offline

Hexagon1423759287202145

Board footer

Powered by FluxBB

[ Started around 1711647753.2324 - Generated in 0.044 seconds, 10 queries executed - Memory usage: 1.38 MiB (Peak: 1.48 MiB) ]