Java Socket Programming

前端 未结 6 1775
孤街浪徒
孤街浪徒 2020-12-15 02:02

I am building a simple client/server application using java sockets and experimenting with the ObjectOutputStream etc.

I have been following the tutorial at this url

6条回答
  •  失恋的感觉
    2020-12-15 02:41

    You are not writing the object anywhere.

    See that link again, somewhere you have to write:

     oos.writeObject( new Date() );
    

    In your code you only have

    ois.readObject();
    

    That's why

提交回复
热议问题