public class ProxyServerSocket
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.net.InetAddress |
localAddress |
protected ProxySettings |
proxySettings |
protected int |
receivesize |
protected int |
sendsize |
protected StreamServerSocket |
serverSocket |
protected SocksProxySocket |
socksSocket |
protected int |
timeout |
Constructor and Description |
---|
ProxyServerSocket(ProxySettings proxySettings) |
Modifier and Type | Method and Description |
---|---|
StreamSocket |
acceptConnection()
Accept a connection
|
void |
bind(int port,
java.net.InetAddress addr)
Bind server socket to a port to listen on
|
void |
close()
Close the socket
|
java.net.InetAddress |
getLocalAddress() |
int |
getLocalPort() |
int |
getReceiveBufferSize()
Gets the value of SO_RCVBUF
|
int |
getSendBufferSize()
Get value of the SO_SNDBUF option
|
protected StreamServerSocket |
getServerSocket() |
int |
getSoTimeout()
Returns setting for SO_TIMEOUT.
|
void |
setLocalAddress(java.net.InetAddress addr) |
void |
setReceiveBufferSize(int size)
Sets the SO_RCVBUF option
|
void |
setSendBufferSize(int size)
Sets the SO_SNDBUF option
|
void |
setSoTimeout(int timeout)
Enable/disable SO_TIMEOUT with the specified timeout, in
milliseconds.
|
protected ProxySettings proxySettings
protected StreamServerSocket serverSocket
protected SocksProxySocket socksSocket
protected java.net.InetAddress localAddress
protected int timeout
protected int receivesize
protected int sendsize
public ProxyServerSocket(ProxySettings proxySettings)
public int getLocalPort()
public java.net.InetAddress getLocalAddress() throws java.io.IOException
java.io.IOException
public void setLocalAddress(java.net.InetAddress addr)
public void setSoTimeout(int timeout) throws java.io.IOException
timeout
- java.net.SocketException
java.io.IOException
public int getSoTimeout() throws java.io.IOException
java.io.IOException
public int getReceiveBufferSize() throws java.net.SocketException
java.net.SocketException
public void setReceiveBufferSize(int size) throws java.net.SocketException
java.net.SocketException
public void setSendBufferSize(int size) throws java.net.SocketException
java.net.SocketException
public int getSendBufferSize() throws java.net.SocketException
java.net.SocketException
public void bind(int port, java.net.InetAddress addr) throws java.io.IOException
port
- addr
- java.io.IOException
protected StreamServerSocket getServerSocket() throws java.io.IOException
java.io.IOException
public StreamSocket acceptConnection() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
Copyright © 2001-2014 Enterprise Distributed Technologies Ltd. All Rights Reserved.