Next: ServerSocket
Up: Java networking
Previous: Introduction
Contents
- Socket socket = new Socket(host, port);
- server is a String or InetAddress.
- UnknownHostException - could not convert the given host/server name to a TCP/IP address.
- IOException - could not find server or port.
- Methods: getInetAddress(), getPort(), getLocalPort(), getLocalAddress(), getInputStream(), getOutputStream().
Next: ServerSocket
Up: Java networking
Previous: Introduction
Contents