Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Chat / [BUG] GetSocketConnected does not update to -1 if the server closes, or the connection is broken ...

Author
Message
SkinK4ir3
3
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 10th Nov 2018 10:18
GetSocketConnected does not update to -1 if the server closes, or the connection is broken ...
When I close the server on my own account, without closing the game, the game continues to print that it is connected ...

code :



screenshot - server working : http://prntscr.com/lgm3ca
screenshot - agk not updating : http://prntscr.com/lgm3l9
Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 10th Nov 2018 16:38 Edited at: 10th Nov 2018 16:40
This is how it should work. Quite annoying, I know, but no bug.
You need to send some cylic ping in order to see if the socket server is closed, or you send something to the server, if there is no tcp response, no message arrived and the server is seen as closed.

If you use the network command set (that also uses tcp sockets), it's already integrated.

[/url]
SkinK4ir3
3
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 10th Nov 2018 18:35
thanks you ! it works fine ...

but you have some examples to give me, so that the code is well structured? (or rather ... without QUICK FIX) ??

Login to post a reply

Server time is: 2019-02-17 17:10:37
Your offset time is: 2019-02-17 17:10:37