Java socket, Is that a dead lock or what?

后端 未结 2 972
小蘑菇
小蘑菇 2021-01-21 00:30

I have a client-server program using socket on the server side and read and write is happening in that way

soc = serversocket.accept();
System.out.println(\"Acce         


        
2条回答
  •  遥遥无期
    2021-01-21 01:12

    Its a deadlock, you must create and flush the ObjectOutputStream first. This is because ObjectInputStream reads the header sent by the OOS before continuing.

提交回复
热议问题