Introduction - If you have any usage issues, please Google them yourself
A simple client/server program to achieve the client and server to send and receive data with each other until one end of the end end of the input data.
Specific:
Customer: (1) the client creates a stream socket and initiates an TCP connection to the server. (or the client creates a data socket)
(2) after the success of the connection, through the socket to the server to send or receive data.
(3) enter or receive the command end , the end of sending and receiving data, and disconnect the connection with the server.
Server: (1) server to create a listening socket, monitor client TCP connection request. (or create a data socket)
(2) when a client TCP connection request is received, the connection socket is created to agree to the creation of the connection.
(3) continue to send or receive data via a socket to a customer.
(4) enter or receive the end command, end with the client s data, disconnect.