|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.net.ServerSocket
net.i2p.util.InternalServerSocket
public class InternalServerSocket
A simple in-JVM ServerSocket using Piped Streams. We use port numbers just like regular sockets. Can only be connected by InternalSocket. Warning - this uses Piped Streams, which don't like multiple writers from threads that may vanish. If you do use multipe writers, you may get intermittent 'write end dead' or 'pipe broken' IOExceptions on the reader side. See http://techtavern.wordpress.com/2008/07/16/whats-this-ioexception-write-end-dead/
Constructor Summary | |
---|---|
InternalServerSocket(int port)
|
Method Summary | |
---|---|
java.net.Socket |
accept()
|
void |
bind(java.net.SocketAddress endpoint)
Deprecated. unsupported |
void |
bind(java.net.SocketAddress endpoint,
int backlog)
Deprecated. unsupported |
void |
close()
|
java.nio.channels.ServerSocketChannel |
getChannel()
Deprecated. unsupported |
java.net.InetAddress |
getInetAddress()
Deprecated. unsupported |
int |
getLocalPort()
|
java.net.SocketAddress |
getLocalSocketAddress()
Deprecated. unsupported |
int |
getReceiveBufferSize()
Deprecated. unsupported |
boolean |
getReuseAddress()
Deprecated. unsupported |
int |
getSoTimeout()
|
(package private) static void |
internalConnect(int port,
InternalSocket clientSock)
This is how the client connects. |
boolean |
isBound()
Deprecated. unsupported |
boolean |
isClosed()
Deprecated. unsupported |
void |
setReceiveBufferSize(int size)
Deprecated. unsupported |
void |
setReuseAddress(boolean on)
Deprecated. unsupported |
void |
setSoTimeout(int timeout)
warning - unsupported |
java.lang.String |
toString()
|
Methods inherited from class java.net.ServerSocket |
---|
implAccept, setPerformancePreferences, setSocketFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InternalServerSocket(int port) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void close()
close
in class java.net.ServerSocket
public java.net.Socket accept() throws java.io.IOException
accept
in class java.net.ServerSocket
java.io.IOException
public java.lang.String toString()
toString
in class java.net.ServerSocket
static void internalConnect(int port, InternalSocket clientSock) throws java.io.IOException
java.io.IOException
public int getLocalPort()
getLocalPort
in class java.net.ServerSocket
public void setSoTimeout(int timeout)
setSoTimeout
in class java.net.ServerSocket
public int getSoTimeout()
getSoTimeout
in class java.net.ServerSocket
public void bind(java.net.SocketAddress endpoint)
bind
in class java.net.ServerSocket
public void bind(java.net.SocketAddress endpoint, int backlog)
bind
in class java.net.ServerSocket
public java.nio.channels.ServerSocketChannel getChannel()
getChannel
in class java.net.ServerSocket
public java.net.InetAddress getInetAddress()
getInetAddress
in class java.net.ServerSocket
public java.net.SocketAddress getLocalSocketAddress()
getLocalSocketAddress
in class java.net.ServerSocket
public int getReceiveBufferSize()
getReceiveBufferSize
in class java.net.ServerSocket
public boolean getReuseAddress()
getReuseAddress
in class java.net.ServerSocket
public boolean isBound()
isBound
in class java.net.ServerSocket
public boolean isClosed()
isClosed
in class java.net.ServerSocket
public void setReceiveBufferSize(int size)
setReceiveBufferSize
in class java.net.ServerSocket
public void setReuseAddress(boolean on)
setReuseAddress
in class java.net.ServerSocket
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |