java socket writeUTF() and readUTF()

后端 未结 3 1547
北恋
北恋 2020-12-14 23:06

I\'ve been reading some Java socket code snippet and fonund out a fact that in socket communication, to send messages in sequence, you don\'t have to seperate them by hand,

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-14 23:32

    java.net.Socket works fine, the stream waits readUTF();

    But when using mina's CumulativeProtocolDecoder, it won't, throws java.io.EOFException

提交回复
热议问题