public class LocalServerSocket extends Object
Constructor and Description |
---|
LocalServerSocket(FileDescriptor fd)
Create a LocalServerSocket from a file descriptor that's already
been created and bound. listen() will be called immediately on it.
|
LocalServerSocket(String name)
Creates a new server socket listening at specified name.
|
Modifier and Type | Method and Description |
---|---|
LocalSocket |
accept()
Accepts a new connection to the socket.
|
void |
close()
Closes server socket.
|
FileDescriptor |
getFileDescriptor()
Returns file descriptor or null if not yet open/already closed
|
LocalSocketAddress |
getLocalSocketAddress()
Obtains the socket's local address
|
public LocalServerSocket(String name) throws IOException
name
- address for socketIOException
public LocalServerSocket(FileDescriptor fd) throws IOException
fd
- bound file descriptorIOException
public LocalSocketAddress getLocalSocketAddress()
public LocalSocket accept() throws IOException
IOException
public FileDescriptor getFileDescriptor()
public void close() throws IOException
IOException