Java Sockets. Server-Client communication

后端 未结 3 641
孤城傲影
孤城傲影 2021-01-20 13:10

I am trying to connect a client with gui with a server withoout gui. Connection is being done, but i cant see any messages between these two apps. (i should get SERVER HERE

3条回答
  •  天涯浪人
    2021-01-20 13:38

    After compairing this code with some I have written in the past using sockets , I noticed you are using output.write(string) and input.readline() - These do not mix well, readline() expects a newline and write does not give one.

    Replace write() with println().

提交回复
热议问题