1 package alt.java.net; 2 3 import java.net.InetAddress; 4 import java.net.SocketException; 5 import java.io.InputStream; 6 import java.io.IOException; 7 import java.io.OutputStream; 8 9 public interface Socket { 10 InetAddress getInetAddress(); 11 12 InetAddress getLocalAddress(); 13 14 int getPort(); 15 16 int getLocalPort(); 17 18 InputStream getInputStream() throws IOException; 19 20 OutputStream getOutputStream() throws IOException; 21 22 void setTcpNoDelay(boolean on) throws SocketException; 23 24 boolean getTcpNoDelay() throws SocketException; 25 26 void setSoLinger(boolean on, int linger) throws SocketException; 27 28 int getSoLinger() throws SocketException; 29 30 void setSoTimeout(int timeout) throws SocketException; 31 32 int getSoTimeout() throws SocketException; 33 34 void setSendBufferSize(int size) 35 throws SocketException; 36 37 int getSendBufferSize() throws SocketException; 38 39 void setReceiveBufferSize(int size) 40 throws SocketException; 41 42 int getReceiveBufferSize() 43 throws SocketException; 44 45 void setKeepAlive(boolean on) throws SocketException; 46 47 boolean getKeepAlive() throws SocketException; 48 49 void close() throws IOException; 50 51 void shutdownInput() throws IOException; 52 53 void shutdownOutput() throws IOException; 54 } 55 | Popular Tags |