Why is my socket closing?
- by Tommy3244
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')