# Server side
* The serversocket class monitors the specified port
* Serversocket Class Construction Method
Serversocket ();
Serversocket (INT port );
Serversocket (INT port, int backlog );
Serversocket (INT port, int backlog, inetaddress bindaddr );
* Waiting for client requests
Serversocket. Accept ();
# Client
* Socket class is the basis for implementing client sockets
* Constructor
Socket (inetaddress address, int port );
Socket (string host, int port );
Socket (inetaddress address, int port, inetaddress localaddr, int localport );
Socket (string host, int port, inetaddress localaddr, int localport );
The last two remote ports used to create and connect them to the specified remote address
* Send and receive data
Socket provides two methods to obtain the input and output streams of the socket respectively.
1. Accept the data getinputstream ();
2. getoutputstream ();