|
Socket Programming in C |
![]() |
|
**NEW** Socket Programming Books here.
To compile :
- linux : gcc -Wall -o foo foo.c
- solaris : gcc -Wall -o foo foo.c -lsocket -lnsl
1. UDP
2. TCP
- UDP server : simple UDP server that prints received messages.
source : udpServer.c
usage : ./udpServer- UDP client : simple UDP client that sends data to server.
source : udpClient.c
usage : ./udpClient server data1 ... dataN3. IP multicast
- TCP server : simple TCP server that prints received messages.
source : tcpServer.c
usage : ./tcpServer- TCP client : simple TCP client that sends data to server.
source : tcpClient.c
usage : ./tcpClient server data1 ... dataN4. Miscellaneous
- multicast server : simple multicast server that prints received messages.
source : mcastServer.c
usage : ./mcastServer multicast_group- multicast client : simple multicast client that sends data on multicast group.
source : mcastClient.c
usage : ./mcastClient multicast_group data1 ... dataN
- MAC address finder : programs that uses a ioctl() call to find out a MAC address in the arp cache. (same function as arp -a)
source : getMAC.c
OS tested : linux 2
usage : ./getMAC interface_IP_address5. Books
Looking for good books ? Here are the Bibles you can purchase at amazon.com :
- THE book about Unix network programming: UNIX Network Programming, Volume 1 by Stevens.
- THE book you want to have if you code in C: The C Programming Language by Kernighan and Ritchie.
- Complete, easy, the Unix programming bible: Advanced Programming in the UNIX(TM) Environment
![]()
![]()
![]()
More socket programming books here.
6. Links
pont.net -> socket programming in Java : simple examples
7. Contact
fred at pont.net
Use of the information and data contained on this WWW site on these pages is at your sole risk.