1. You use new ServerSocket(port) to create a server socket. You can use any number after 1024. If a port is already in use, you will get an exception; then you can choose another number. You can have a server running on a port serving multiple clients.
2. A server socket can handle connection requests from a client. After the connection is established, the communications between the server and the client are through the client sockets.
3. The client program uses new Socket(hostname, port) to request a connection to the server.
4. The server listens for connecting requests from clients by invoking serverSocket.accept(), which blocks the program from executing the next statement until a connection is established.
5. You need to use getInputStream() to create a stream to receive data from the socket and use getOutputStream() to create a stream to send data from the socket. Objects can be transferred using the object stream wrapped on the socket stream as long as the objects are instances of Serializable.
6. Use the Thread class and create multiple threads to handle multiple connections, one thread per client.
7. An application can retrieve a file from a remote host, but it cannot update a file on a remote host?