standard socket cleanups

This commit is contained in:
zzz
2011-01-21 15:48:05 +00:00
parent d2adbfdf24
commit b80c0546a2
2 changed files with 6 additions and 1 deletions

View File

@@ -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();

View File

@@ -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");
} }
/** /**