First, ServerSocket
Java.lang.Object
|-java.net.serversocket
There are sub-categories Sslserversocket.
| This class implements a server socket. The server socket waits for the request to pass through the network. It performs certain actions based on the request, and may then return the results to the requestor. |
Common construction Methods:
ServerSocket(int port)
Creates a server socket bound to a specific port. |
Common methods:
socket |
Accept ()
listens for and accepts connections to this socket. |
; void |
bind (socketaddress endpoint)
binds ServerSocket to a specific address (IP address and port number). |
void |
close()
Close the socket. |
inetaddress |
getinetaddress ()
returns the local address of this server socket. |
; int |
getlocalport ()
returns the port on which this socket listens. |
; SocketAddress |
getlocalsocketaddress ()
returns the address of the endpoint bound by this socket and returns null if it is not already bound. |
Java Network flow