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 Classic Chat / Is socket connection bugged?

Author
Message
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 4th Oct 2019 07:40
After using ConnectSocket(), I use GetSocketConnected().
Server using GetSocketListenerConnection() return a socket id.

However, GetSocketConnected() always return a -1.

Could someone test this out?

Perhaps a guide in the document would be helpful from the developer...

Appreciated!
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 4th Oct 2019 10:47
plenty of examples on the forums about sockets out there but I found this one which may help
https://forum.thegamecreators.com/thread/223242
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 23rd Oct 2019 01:52
agk socket commands are basically the same as the way an os uses them. when a socket is connected it tells the os a a socket is connected, it grabs the id then clears it. if it was always 1 it would keep trying to connect to a socket over and over. so if a socket is connected store its value cause it will be erased immediatley.

Login to post a reply

Server time is: 2024-04-24 16:34:20
Your offset time is: 2024-04-24 16:34:20