study the unix network program,echo server and client is the example.