Package net.i2p.client.streaming.impl
Class StandardSocket
- java.lang.Object
- 
- java.net.Socket
- 
- net.i2p.client.streaming.impl.StandardSocket
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable
 
 class StandardSocket extends Socket Bridge to I2PSocket. This extends Socket to make porting apps easier. Methods throw IOExceptions like Sockets do, rather than returning null for some methods. StandardSockets are always bound, and always start out connected (unless connectDelay is > 0). You may not create an unbound StandardSocket. Create this through the SocketManager. Todo: Make public and add getPeerDestination() ?- Since:
- 0.8.4
- Author:
- zzz
 
- 
- 
Constructor SummaryConstructors Constructor Description StandardSocket(I2PSocket socket)
 - 
Method Summary- 
Methods inherited from class java.net.SocketgetOption, setOption, setSocketImplFactory, supportedOptions
 
- 
 
- 
- 
- 
Constructor Detail- 
StandardSocketStandardSocket(I2PSocket socket) 
 
- 
 - 
Method Detail- 
bindpublic void bind(SocketAddress bindpoint) - Overrides:
- bindin class- Socket
- Throws:
- UnsupportedOperationException- always
 
 - 
closepublic void close() throws IOException- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- Socket
- Throws:
- IOException
 
 - 
connectpublic void connect(SocketAddress endpoint) - Overrides:
- connectin class- Socket
- Throws:
- UnsupportedOperationException- always
 
 - 
connectpublic void connect(SocketAddress endpoint, int timeout) - Overrides:
- connectin class- Socket
- Throws:
- UnsupportedOperationException- always
 
 - 
getChannelpublic SocketChannel getChannel() - Overrides:
- getChannelin class- Socket
- Returns:
- null always, unimplemented
 
 - 
getInetAddresspublic InetAddress getInetAddress() - Overrides:
- getInetAddressin class- Socket
- Returns:
- null always
 
 - 
getInputStreampublic InputStream getInputStream() throws IOException - Overrides:
- getInputStreamin class- Socket
- Throws:
- IOException
 
 - 
getKeepAlivepublic boolean getKeepAlive() - Overrides:
- getKeepAlivein class- Socket
 
 - 
getLocalAddresspublic InetAddress getLocalAddress() - Overrides:
- getLocalAddressin class- Socket
- Returns:
- null always
 
 - 
getLocalPortpublic int getLocalPort() - Overrides:
- getLocalPortin class- Socket
- Returns:
- the port or 0 if unknown
 
 - 
getLocalSocketAddresspublic SocketAddress getLocalSocketAddress() - Overrides:
- getLocalSocketAddressin class- Socket
- Returns:
- an I2PSocketAddress as of 0.9.26; prior to that, returned null
- Since:
- implemented in 0.9.26
 
 - 
getOOBInlinepublic boolean getOOBInline() - Overrides:
- getOOBInlinein class- Socket
- Returns:
- false always
 
 - 
getOutputStreampublic OutputStream getOutputStream() throws IOException - Overrides:
- getOutputStreamin class- Socket
- Throws:
- IOException
 
 - 
getReceiveBufferSizepublic int getReceiveBufferSize() - Overrides:
- getReceiveBufferSizein class- Socket
 
 - 
getRemoteSocketAddresspublic SocketAddress getRemoteSocketAddress() - Overrides:
- getRemoteSocketAddressin class- Socket
- Returns:
- an I2PSocketAddress as of 0.9.26; prior to that, threw UnsupportedOperationException
- Since:
- implemented in 0.9.26
 
 - 
getReuseAddresspublic boolean getReuseAddress() - Overrides:
- getReuseAddressin class- Socket
- Returns:
- false always
 
 - 
getSendBufferSizepublic int getSendBufferSize() - Overrides:
- getSendBufferSizein class- Socket
 
 - 
getSoLingerpublic int getSoLinger() - Overrides:
- getSoLingerin class- Socket
 
 - 
getSoTimeoutpublic int getSoTimeout() - Overrides:
- getSoTimeoutin class- Socket
 
 - 
getTcpNoDelaypublic boolean getTcpNoDelay() - Overrides:
- getTcpNoDelayin class- Socket
- Returns:
- false always
 
 - 
getTrafficClasspublic int getTrafficClass() - Overrides:
- getTrafficClassin class- Socket
- Returns:
- 0 always
 
 - 
isConnectedpublic boolean isConnected() - Overrides:
- isConnectedin class- Socket
 
 - 
isInputShutdownpublic boolean isInputShutdown() - Overrides:
- isInputShutdownin class- Socket
 
 - 
isOutputShutdownpublic boolean isOutputShutdown() - Overrides:
- isOutputShutdownin class- Socket
 
 - 
sendUrgentDatapublic void sendUrgentData(int data) - Overrides:
- sendUrgentDatain class- Socket
- Throws:
- UnsupportedOperationException- always
 
 - 
setKeepAlivepublic void setKeepAlive(boolean on) - Overrides:
- setKeepAlivein class- Socket
 
 - 
setOOBInlinepublic void setOOBInline(boolean on) - Overrides:
- setOOBInlinein class- Socket
- Throws:
- UnsupportedOperationException- if on is true
 
 - 
setPerformancePreferencespublic void setPerformancePreferences(int connectionTime, int latency, int bandwidth)Does nothing.- Overrides:
- setPerformancePreferencesin class- Socket
 
 - 
setReceiveBufferSizepublic void setReceiveBufferSize(int size) Does nothing.- Overrides:
- setReceiveBufferSizein class- Socket
 
 - 
setReuseAddresspublic void setReuseAddress(boolean on) Does nothing.- Overrides:
- setReuseAddressin class- Socket
 
 - 
setSendBufferSizepublic void setSendBufferSize(int size) Does nothing.- Overrides:
- setSendBufferSizein class- Socket
 
 - 
setSoLingerpublic void setSoLinger(boolean on, int linger)Does nothing.- Overrides:
- setSoLingerin class- Socket
 
 - 
setSoTimeoutpublic void setSoTimeout(int timeout) throws SocketException- Overrides:
- setSoTimeoutin class- Socket
- Throws:
- SocketException
 
 - 
setTcpNoDelaypublic void setTcpNoDelay(boolean on) Does nothing.- Overrides:
- setTcpNoDelayin class- Socket
 
 - 
setTrafficClasspublic void setTrafficClass(int tc) Does nothing.- Overrides:
- setTrafficClassin class- Socket
 
 - 
shutdownInputpublic void shutdownInput() throws IOException- Overrides:
- shutdownInputin class- Socket
- Throws:
- IOException
 
 - 
shutdownOutputpublic void shutdownOutput() throws IOException- Overrides:
- shutdownOutputin class- Socket
- Throws:
- IOException
 
 
- 
 
-