Skip to content

Client send a number to server. server increase the number and send it back. and so on.

License

Notifications You must be signed in to change notification settings

raywill/pingpongnetwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PingPong Network

compile

gcc server.c -o server
gcc client.c -o client

run

./server
./client 127.0.0.1 100000

explain

client send a number to server. server increase the number and send it back. Then the client establish a new connection to server and send the increased number to server, and so on.

client   --------- 0 ----------> server
client   <--------- 1 ---------- server
client   --------- 1 ----------> server
client   <--------- 2 ---------- server
client   --------- 2 ----------> server
client   <--------- 3 ---------- server
....

Note: This is a very basic networking demo. no extra thread used.

About

Client send a number to server. server increase the number and send it back. and so on.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages