wt.util
Class WrappedSocket
java.lang.Object
java.net.Socket
wt.util.WrappedSocket
- public class WrappedSocket
- extends Socket
Fields inherited from class java.net.Socket |
|
Methods inherited from class java.net.Socket |
bind, connect, connect, getChannel, getLocalSocketAddress, getOOBInline, getRemoteSocketAddress, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setOOBInline, setSocketImplFactory, shutdownInput, shutdownOutput |
VERBOSE_CLOSE
public static boolean VERBOSE_CLOSE
VERBOSE_IO
public static boolean VERBOSE_IO
socketCache
private static Cache socketCache
numSockets
private static int numSockets
bytesIn
private static long bytesIn
bytesOut
private static long bytesOut
inBufSize
private int inBufSize
outBufSize
private int outBufSize
socket
private Socket socket
inputStream
private InputStream inputStream
outputStream
private OutputStream outputStream
closed
private boolean closed
WrappedSocket
public WrappedSocket(Socket this_socket,
int in_buf_size,
int out_buf_size)
throws SocketException
incrementNumSockets
private static void incrementNumSockets()
decrementNumSockets
private static void decrementNumSockets()
getNumSockets
public static int getNumSockets()
getBytesIn
public static long getBytesIn()
getBytesOut
public static long getBytesOut()
setMaxSockets
public static void setMaxSockets(int max_sockets)
active
private void active(WrappedSocket wrapped_socket)
activeIn
private void activeIn(WrappedSocket wrapped_socket,
int bytes_in)
activeOut
private void activeOut(WrappedSocket wrapped_socket,
int bytes_out)
finalize
protected void finalize()
throws Throwable
- Throws:
Throwable
getInputStream
public InputStream getInputStream()
throws IOException
- Throws:
IOException
getOutputStream
public OutputStream getOutputStream()
throws IOException
- Throws:
IOException
getInetAddress
public InetAddress getInetAddress()
getLocalAddress
public InetAddress getLocalAddress()
getPort
public int getPort()
getLocalPort
public int getLocalPort()
setTcpNoDelay
public void setTcpNoDelay(boolean on)
throws SocketException
- Throws:
SocketException
getTcpNoDelay
public boolean getTcpNoDelay()
throws SocketException
- Throws:
SocketException
setSoLinger
public void setSoLinger(boolean on,
int val)
throws SocketException
- Throws:
SocketException
getSoLinger
public int getSoLinger()
throws SocketException
- Throws:
SocketException
setSoTimeout
public void setSoTimeout(int timeout)
throws SocketException
- Throws:
SocketException
getSoTimeout
public int getSoTimeout()
throws SocketException
- Throws:
SocketException
setSendBufferSize
public void setSendBufferSize(int size)
throws SocketException
- Throws:
SocketException
getSendBufferSize
public int getSendBufferSize()
throws SocketException
- Throws:
SocketException
setReceiveBufferSize
public void setReceiveBufferSize(int size)
throws SocketException
- Throws:
SocketException
getReceiveBufferSize
public int getReceiveBufferSize()
throws SocketException
- Throws:
SocketException
setKeepAlive
public void setKeepAlive(boolean on)
throws SocketException
- Throws:
SocketException
getKeepAlive
public boolean getKeepAlive()
throws SocketException
- Throws:
SocketException
setTrafficClass
public void setTrafficClass(int tc)
throws SocketException
- Throws:
SocketException
getTrafficClass
public int getTrafficClass()
throws SocketException
- Throws:
SocketException
setReuseAddress
public void setReuseAddress(boolean on)
throws SocketException
- Throws:
SocketException
getReuseAddress
public boolean getReuseAddress()
throws SocketException
- Throws:
SocketException
close
public void close()
throws IOException
- Throws:
IOException
toString
public String toString()