Networking
suggest changeSyntax
- new Socket("localhost", 1234); // Connects to a server at address "localhost" and port 1234
- new ServerSocket(1234); // Listens on port 1234. The class is ServerSocket, not SocketServer, and this constructor does not take a host name
- serverSocket.accept(); // Accepts a new Socket which can be used to communicate with the client
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents