http://www.csee.usf.edu/~christen/class2/class2.html
- Miscellaneous
Some general stuff:
- Ten Commandments for Teaching - A teaching philosophy from Yale Patt (UT-Austin). I really like these commandments and try to follow them.
Sockets progamming related stuff:
- Christensen C Programming Style Guidelines - Style guidelines for all students in EEL 4881 to follow.
- Beej's Guide to Network Programming - A excellent sockets programming guide.
- TCP/IP Sockets in C by Donahoo and Calvert - Probably the best handbook on sockets programming. I highly recommend this book as an addition to your personal library. The book website has some very useful sample programs (see here).
- I use the bcc32 and cl command line compilers to build my programs. If you want to use the Microsoft Visual IDE, see here for helpful instructions. The net is that you must build a console application and include wsock32.dll in the Project Settings / Object-library modules list.
-
Beej's Guide to Network Programming
Using Internet Sockets
Contents
- 1. Intro
- 1.1. Audience
- 1.2. Platform and Compiler
- 1.3. Official Homepage and Books For Sale
- 1.4. Note for Solaris/SunOS Programmers
- 1.5. Note for Windows Programmers
- 1.6. Email Policy
- 1.7. Mirroring
- 1.8. Note for Translators
- 1.9. Copyright and Distribution
- 2. What is a socket?
- 2.1. Two Types of Internet Sockets
- 2.2. Low level Nonsense and Network Theory
- 3. IP Addresses,
struct s, and Data Munging - 3.1. IP Addresses, versions 4 and 6
- 3.2. Byte Order
- 3.3.
struct s - 3.4. IP Addresses, Part Deux
- 4. Jumping from IPv4 to IPv6
- 5. System Calls or Bust
- 5.1. getaddrinfo()—Prepare to launch!
- 5.2. socket()—Get the File Descriptor!
- 5.3. bind()—What port am I on?
- 5.4. connect()—Hey, you!
- 5.5. listen()—Will somebody please call me?
- 5.6. accept()—"Thank you for calling port 3490."
- 5.7. send() and recv()—Talk to me, baby!
- 5.8. sendto() and recvfrom()—Talk to me, DGRAM-style
- 5.9. close() and shutdown()—Get outta my face!
- 5.10. getpeername()—Who are you?
- 5.11. gethostname()—Who am I?
- 6. Client-Server Background
- 6.1. A Simple Stream Server
- 6.2. A Simple Stream Client
- 6.3. Datagram Sockets
- 7. Slightly Advanced Techniques
- 7.1. Blocking
- 7.2. select()—Synchronous I/O Multiplexing
- 7.3. Handling Partial send()s
- 7.4. Serialization—How to Pack Data
- 7.5. Son of Data Encapsulation
- 7.6. Broadcast Packets—Hello, World!
- 8. Common Questions
- 9. Man Pages
- 9.1. accept()
- 9.2. bind()
- 9.3. connect()
- 9.4. close()
- 9.5. getaddrinfo(), freeaddrinfo(), gai_strerror()
- 9.6. gethostname()
- 9.7. gethostbyname(), gethostbyaddr()
- 9.8. getnameinfo()
- 9.9. getpeername()
- 9.10. errno
- 9.11. fcntl()
- 9.12. htons(), htonl(), ntohs(), ntohl()
- 9.13. inet_ntoa(), inet_aton(), inet_addr
- 9.14. inet_ntop(), inet_pton()
- 9.15. listen()
- 9.16. perror(), strerror()
- 9.17. poll()
- 9.18. recv(), recvfrom()
- 9.19. select()
- 9.20. setsockopt(), getsockopt()
- 9.21. send(), sendto()
- 9.22. shutdown()
- 9.23. socket()
- 9.24.
struct sockaddr and pals - 10. More References
- 10.1. Books
- 10.2. Web References
- 10.3. RFCs