forked from I2P_Developers/i2p.i2p
standard socket cleanups
This commit is contained in:
@@ -22,6 +22,7 @@ import net.i2p.I2PException;
|
|||||||
* You may not create an unbound StandardServerSocket.
|
* You may not create an unbound StandardServerSocket.
|
||||||
* Create this through the SocketManager.
|
* Create this through the SocketManager.
|
||||||
*
|
*
|
||||||
|
* @author zzz
|
||||||
* @since 0.8.4
|
* @since 0.8.4
|
||||||
*/
|
*/
|
||||||
class StandardServerSocket extends ServerSocket {
|
class StandardServerSocket extends ServerSocket {
|
||||||
@@ -34,6 +35,7 @@ class StandardServerSocket extends ServerSocket {
|
|||||||
_socket = socket;
|
_socket = socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Socket accept() throws IOException {
|
public Socket accept() throws IOException {
|
||||||
try {
|
try {
|
||||||
I2PSocket sock = _socket.accept();
|
I2PSocket sock = _socket.accept();
|
||||||
|
@@ -23,6 +23,9 @@ import net.i2p.I2PException;
|
|||||||
* You may not create an unbound StandardSocket.
|
* You may not create an unbound StandardSocket.
|
||||||
* Create this through the SocketManager.
|
* Create this through the SocketManager.
|
||||||
*
|
*
|
||||||
|
* Todo: Make public and add getPeerDestination() ?
|
||||||
|
*
|
||||||
|
* @author zzz
|
||||||
* @since 0.8.4
|
* @since 0.8.4
|
||||||
*/
|
*/
|
||||||
class StandardSocket extends Socket {
|
class StandardSocket extends Socket {
|
||||||
@@ -132,7 +135,7 @@ class StandardSocket extends Socket {
|
|||||||
OutputStream rv = _socket.getOutputStream();
|
OutputStream rv = _socket.getOutputStream();
|
||||||
if (rv != null)
|
if (rv != null)
|
||||||
return rv;
|
return rv;
|
||||||
throw new IOException("Mo stream");
|
throw new IOException("No stream");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user