ObjectInput and Output streams are not being accepted by client/server

前端 未结 2 1560
-上瘾入骨i
-上瘾入骨i 2020-12-12 08:15

I have one program with two serverside processes. One server just sends an ArrayList to client. The other server first takes a string from client and then finds proper recor

相关标签:
2条回答
  • 2020-12-12 08:46

    You need to create and flush() the ObjectOutputStream first, or it will get stuck trying to read the header, the other end hasn't sent because its waiting to read your header.

    0 讨论(0)
  • 2020-12-12 08:58

    You need to create the ObjectOutputStream before the ObjectInputStream at both ends.

    0 讨论(0)
提交回复
热议问题