A simple example with Socket
Concepts:
socket:
thread
I/O stream
Output stream -> Sending buffer queue (SendQ)-> Network
Network-> Receiving buffer queue (RecvQ)->Input Stream
Example:
Write a net program, include a server and client, client will send a string to the server, and server should print the string to the terminal, and return the length of string to the client, and finally the client should print the length sent from server. You should do it in TCP and UDP way.