Why is my socket closing?

Posted by Tommy3244 on Stack Overflow See other posts from Stack Overflow or by Tommy3244
Published on 2012-12-08T23:02:20Z Indexed on 2012/12/08 23:03 UTC
Read the original article Hit count: 122

Filed under:

Ok, so I am making a multiplayer game. I am working out the kinks in the server/client connectivity system. I can't seam to work out this error. Mainly, my server code does the following:

Accepts Client Using SocketServer Module

CLIENT --> SERVER sends Login byte (1 byte) + login username and password (200 bytes)

SERVER request for 1 byte by struct.calcsize('b')

CLIENT has exception on read

SERVER recieves byte from CLIENT and sends CLIENT a struct packed byte with the value of 4

SERVER has exception on send

So, it is the client excepting. The client exception is:

socket.error: (10054, 'Connection reset by peer')

And the server error is this:

error: (9, 'Bad file descriptor')

© Stack Overflow or respective owner

Related posts about python