This website is preserved for historical and scholarly reference and is no longer actively maintained.
Tutorial on Linux Sockets Programming....
We use two examples:
- UDPEcho2.tar.gz : a simple UDP-based ping program
- perfTool.tar.gz : builds on the UDP ping program, to provide an assessment tool involving the sending and reception of a stream of UDP packets
Sections of the tutorial
- -Overview
- -UDPEcho2:
- Downloading the code
- -Building the code
- -Running the code
- perfTool
- Downloading the code
- -Building the code
- -Running the code
Overview
Downloading the code....UDPEcho2.tar.gz
On the machine you will use to build and run the code, start a term session
Building the code- assumes Linux (modify Make.defines if on MAC OS)
- -edit Makefile and find the line "DO NOT DELETE" and delete all lines after this (yes...confusing!!)
- -To build:
- >make clean
- >make
- -Issue an ls -lt and verify ./client and ./server were generated
Running the code
- -First, make sure the server is started. On the server (assume its name is mymachine.clemson.edu and we want to run the server on port 5000)
- >./server 5000
- -Next, start the client on whatever machine you like. Note....it must have connectivity with the server. To test....issue a ping mymachine.clemson.edu)
- >./client mymachine.clemson.edu 5000 1 1000 100
Downloading the code....perfTool.tar.gz
On the machine you will use to build and run the code, start a term session
Building the code- assumes Linux (modify Make.defines if on MAC OS)
- -edit Makefile and find the line "DO NOT DELETE" and delete all lines after this (yes...confusing!!)
- -To build:
- >make clean
- >make
- -Issue an ls -lt and verify ./perfClient and ./perfServer were generated
Running the code
-First, make sure the server is started. On the server (assume its name is mymachine.clemson.edu and we want to run the server on port 5000)
Last updated: 2/20/17