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 Studio Chat / broken command? getsocketconnected()

Author
Message
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 15th Jun 2019 05:40 Edited at: 15th Jun 2019 17:48
if getsocketexists(100001)=1
print(GetSocketconnected(100001))
endif


if getsocketexists(100001)=1
if getsocketconnected(100001)<>1
deletesocket(100001)
print("socket deleted")
endif
endif

to be more specific it will always print get socket connected and never socket deleted because get socket connected once connected never updates once client disconnects


This fails in Agk and Agk studio nearly completely breaks online capability
A child's dream never dies.





Amon
9
Years of Service
User Offline
Joined: 30th May 2014
Location: Shropshire, United Kingdom
Posted: 16th Jun 2019 00:16
File a bug report.
Win 10 Pro - AMD RYZEN 7 Octacore 3.8ghz - 32GB DDR4 - RTX 2070 8GB
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 16th Jun 2019 08:07
I found a work around. i set up a server client heartbeat on a timer if it doesn't hear a thump every 3000 ms it assumes the client is dead and kills the socket and lets a new player join.
A child's dream never dies.





Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 4th Jul 2019 12:42 Edited at: 4th Jul 2019 12:42
I think the regular network commands don't register a disconnected client UNLESS you send data that cannot be received, THEN it registers that the client left. Dunno if it is the same for sockets. I also use heartbeats. (AGK C btw, just started using AppGameKit S today)
13/0

Login to post a reply

Server time is: 2024-04-19 16:01:03
Your offset time is: 2024-04-19 16:01:03