Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IOCP Help
#1
IOCP Tutorial: viewtopic.php?f=69&t=895

All unedited MS version have a check in ServerLogic if the socket state is above 7 (state 8 and 9 is closing state and error state). And this check is done to see if the player has encountered problems:
Code:
If frmServer.Socket(i).State > 7 Then
            Call CloseSocket(i)
        End If
And I'd like to add that to my game. Same things goes for the isconnected function, but here it checks:
Code:
If frmServer.Socket(Index).State = sckConnected Then
But in IOCP, it doesn't check if a player got disconnected in the gameai loop, and the isconnected function only checks if the socket is empty or not. And I believe a socket can have something in it eventhough the client is messed up and not receiving/sending data.
Code:
If Not GameServer.Sockets(index).Socket Is Nothing Then
So the code above can't be used in the gameai loop to check for state>7.

Now I'd like to add a check like that with the state > 7 in the game loop. But how would I do that?
Reply
#2
According to Verrigans way of programming, that would be the case. But I can't rely on him since he doesn't visist ms anymore.
Reply
#3
I'll help you guys out when I have more time ><
I have IOCP running on my server. Works like heaven.
Reply
#4
Dragoons Master Wrote:I'll help you guys out when I have more time ><
I have IOCP running on my server. Works like heaven.
Yeah well it works for me too. But I seem to have something wrong with my server and Im trying to figure out whats casuing it. Hence the topic. But I always appreciate help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)