java.io.StreamCorruptedException: invalid type code: 00

后端 未结 6 1760
天命终不由人
天命终不由人 2020-11-27 08:43

So basically im writing a client-server multiplayer game. I have a SeverCommunicationThread that creates a gameThread if he receives a RequestForGame creates a gameThread.

6条回答
  •  攒了一身酷
    2020-11-27 09:11

    I too had this exception. It occurred because I used two threads for Server class and Client class. I used one thread for object sending and receiving thing. Then it was ok. This is easy way to solve the problem if you are not familiar with synchronized.

提交回复
热议问题