socket It is simple socket programming. 'echo_server.c' and 'echo_client.c' are codes that only server can send string to client. After you compile it, you can run it with commands './echo_server PORT' and './echo_client 127.0.0.1 PORT'. 'chat_server.c' and 'chat_client.c' are codes that server and client can send string to each other in turn, not at the same time. (Use thread, for enabling at the same time.)