1 16 package org.apache.commons.net; 17 18 import java.io.IOException ; 19 import java.net.InetAddress ; 20 import java.net.ServerSocket ; 21 import java.net.Socket ; 22 import java.net.UnknownHostException ; 23 24 37 38 public interface SocketFactory 39 { 40 41 50 public Socket createSocket(String host, int port) 51 throws UnknownHostException , IOException ; 52 53 54 62 public Socket createSocket(InetAddress address, int port) 63 throws IOException ; 64 65 66 78 public Socket createSocket(String host, int port, InetAddress localAddr, 79 int localPort) 80 throws UnknownHostException , IOException ; 81 82 93 public Socket createSocket(InetAddress address, int port, 94 InetAddress localAddr, int localPort) 95 throws IOException ; 96 97 106 public ServerSocket createServerSocket(int port) throws IOException ; 107 108 119 public ServerSocket createServerSocket(int port, int backlog) 120 throws IOException ; 121 122 135 public ServerSocket createServerSocket(int port, int backlog, 136 InetAddress bindAddr) 137 throws IOException ; 138 } 139 | Popular Tags |