class StandardSocket extends Socket
| Constructor and Description |
|---|
StandardSocket(I2PSocket socket)Wraps an I2PSocket in a java.net.Socket. |
| Modifier and Type | Method and Description |
|---|---|
void | bind(SocketAddress bindpoint)Binding is not supported. |
void | close()Closes the socket and the underlying I2PSocket. |
void | connect(SocketAddress endpoint)Connecting is not supported. |
void | connect(SocketAddress endpoint,
int timeout)Connecting is not supported. |
SocketChannel | getChannel()Channel is not supported. |
InetAddress | getInetAddress()No remote address. |
InputStream | getInputStream()Input stream from the underlying I2PSocket. |
boolean | getKeepAlive()Keep-alive setting. |
InetAddress | getLocalAddress()No local address. |
int | getLocalPort()Local port. |
SocketAddress | getLocalSocketAddress()Local socket address. |
boolean | getOOBInline()OOB inline is not supported. |
OutputStream | getOutputStream()Output stream from the underlying I2PSocket. |
int | getPort()Remote port. |
int | getReceiveBufferSize()Inbound buffer size. |
SocketAddress | getRemoteSocketAddress()Remote socket address. |
boolean | getReuseAddress()Reuse address is not supported. |
int | getSendBufferSize()Outbound buffer size. |
int | getSoLinger()SO_LINGER is not implemented. |
int | getSoTimeout()Socket timeout. |
boolean | getTcpNoDelay()TCP_NODELAY is not supported. |
int | getTrafficClass()Traffic class is not supported. |
boolean | isBound()Always bound. |
boolean | isClosed()Whether closed. |
boolean | isConnected()Whether connected. |
boolean | isInputShutdown()Whether input shutdown. |
boolean | isOutputShutdown()Whether output shutdown. |
void | sendUrgentData(int data)Urgent data is not supported. |
void | setKeepAlive(boolean on)Keep-alive setting. |
void | setOOBInline(boolean on)OOB inline setting. |
void | setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)Does nothing. |
void | setReceiveBufferSize(int size)Does nothing. |
void | setReuseAddress(boolean on)Does nothing. |
void | setSendBufferSize(int size)Does nothing. |
void | setSoLinger(boolean on,
int linger)Does nothing. |
void | setSoTimeout(int timeout)Socket timeout. |
void | setTcpNoDelay(boolean on)Does nothing. |
void | setTrafficClass(int tc)Does nothing. |
void | shutdownInput()Shuts down the input side, closing the underlying I2PSocket. |
void | shutdownOutput()Shuts down the output side, closing the underlying I2PSocket. |
String | toString()String representation of the underlying I2PSocket. |
setSocketImplFactoryStandardSocket(I2PSocket socket)
public void bind(SocketAddress bindpoint)
bind in class SocketUnsupportedOperationException - alwayspublic void close()
throws IOExceptionclose in interface Closeableclose in interface AutoCloseableclose in class SocketIOExceptionpublic void connect(SocketAddress endpoint)
connect in class SocketUnsupportedOperationException - alwayspublic void connect(SocketAddress endpoint, int timeout)
connect in class SocketUnsupportedOperationException - alwayspublic SocketChannel getChannel()
getChannel in class Socketpublic InetAddress getInetAddress()
getInetAddress in class Socketpublic InputStream getInputStream() throws IOException
getInputStream in class SocketIOException - if the socket has no input streampublic boolean getKeepAlive()
getKeepAlive in class Socketpublic InetAddress getLocalAddress()
getLocalAddress in class Socketpublic int getLocalPort()
getLocalPort in class Socketpublic SocketAddress getLocalSocketAddress()
getLocalSocketAddress in class Socketpublic boolean getOOBInline()
getOOBInline in class Socketpublic OutputStream getOutputStream() throws IOException
getOutputStream in class SocketIOException - if the socket has no output streampublic int getPort()
public int getReceiveBufferSize()
getReceiveBufferSize in class Socketpublic SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress in class Socketpublic boolean getReuseAddress()
getReuseAddress in class Socketpublic int getSendBufferSize()
getSendBufferSize in class Socketpublic int getSoLinger()
getSoLinger in class Socketpublic int getSoTimeout()
getSoTimeout in class Socketpublic boolean getTcpNoDelay()
getTcpNoDelay in class Socketpublic int getTrafficClass()
getTrafficClass in class Socketpublic boolean isClosed()
public boolean isConnected()
isConnected in class Socketpublic boolean isInputShutdown()
isInputShutdown in class Socketpublic boolean isOutputShutdown()
isOutputShutdown in class Socketpublic void sendUrgentData(int data)
sendUrgentData in class SocketUnsupportedOperationException - alwayspublic void setKeepAlive(boolean on)
setKeepAlive in class Socketon - true to enable keep-alive (inactivity action SEND), false for NOOPpublic void setOOBInline(boolean on)
setOOBInline in class Socketon - true to throw UnsupportedOperationException, false does nothingUnsupportedOperationException - if on is truepublic void setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)setPerformancePreferences in class Socketpublic void setReceiveBufferSize(int size)
setReceiveBufferSize in class Socketpublic void setReuseAddress(boolean on)
setReuseAddress in class Socketpublic void setSendBufferSize(int size)
setSendBufferSize in class Socketpublic void setSoLinger(boolean on,
int linger)setSoLinger in class Socketpublic void setSoTimeout(int timeout)
throws SocketExceptionsetSoTimeout in class Sockettimeout - the timeout in millisecondsSocketException - if the options are unavailablepublic void setTcpNoDelay(boolean on)
setTcpNoDelay in class Socketpublic void setTrafficClass(int tc)
setTrafficClass in class Socketpublic void shutdownInput()
throws IOExceptionshutdownInput in class SocketIOExceptionpublic void shutdownOutput()
throws IOExceptionshutdownOutput in class SocketIOException