February 2014
Beginner
1248 pages
62h 25m
English
Figures 28.3 and 28.5 use stream sockets, ObjectInputStream and ObjectOutputStream to demonstrate a simple client/server chat application. The server waits for a client connection attempt. When a client connects to the server, the server application sends the client a String object (recall that Strings are Serializable objects) indicating that the connection was successful. Then the client displays the message. The client and server applications each provide text fields that allow the user to type a message and send it to the other application. When the client or the server sends the String "TERMINATE", the connection terminates. Then the server waits for the next client to connect. ...
Read now
Unlock full access