public class UnixServerSocket extends Object implements Closeable
| Constructor and Description |
|---|
UnixServerSocket()
Create an un-bound server socket.
|
UnixServerSocket(String _address)
Create a server socket bound to the given address.
|
UnixServerSocket(UnixSocketAddress _address)
Create a server socket bound to the given address.
|
| Modifier and Type | Method and Description |
|---|---|
UnixSocket |
accept()
Accepts a connection on the ServerSocket.
|
void |
bind(String _address)
Binds a server socket to the given address.
|
void |
bind(UnixSocketAddress _address)
Binds a server socket to the given address.
|
void |
close()
Closes the ServerSocket.
|
UnixSocketAddress |
getAddress()
Return the address this socket is bound to.
|
boolean |
isBound()
Check the status of the socket.
|
boolean |
isClosed()
Check the status of the socket.
|
public UnixServerSocket()
public UnixServerSocket(UnixSocketAddress _address) throws IOException
_address - Path to the socket.IOException - on errorpublic UnixServerSocket(String _address) throws IOException
_address - Path to the socket.IOException - on errorpublic UnixSocket accept() throws IOException
IOException - on errorpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOException - on errorpublic void bind(UnixSocketAddress _address) throws IOException
_address - Path to the socket.IOException - on errorpublic void bind(String _address) throws IOException
_address - Path to the socket.IOException - on errorpublic UnixSocketAddress getAddress()
public boolean isClosed()
public boolean isBound()
Copyright © 2020. All rights reserved.