Chapter 2. WinsockBerkeley Sockets Programming

[ LiB ]

Chapter 2. Winsock/Berkeley Sockets Programming

After reading Chapter 1, "Introduction to Network Programming," you know the basics of Internet operations and networking in general for game programming. However, I have not yet shown you how to actually use network communications in your programming adventures .

Most people fear learning about network programming because it seems like such an advanced topic. I put off network programming for years because of this, and that was a mistake. I had absolutely no idea how easy networked communications were.

Many years ago, researchers at the University at Berkeley created an Application Programming Interface (API) to make it easy for the C programming language to use Internet communications. This API eventually became known as the Berkeley Sockets API . Nearly every UNIX-based operating system supports it, as does MacOS and Windows. Microsoft created its own version of Berkeley Sockets and called it Winsock . Very little is changed in the Winsock library, so it is entirely possible to use the two libraries interchangeably.

In this chapter, you will learn to:

  • Understand the fundamentals of byte ordering

  • Understand socket basics

  • Work with the API for sockets

  • Find IP addresses using the Domain Name System (DNS)

  • Use demos that illustrate the concepts of the chapter

[ LiB ]


MUD Game Programming
MUD Game Programming (Premier Press Game Development)
ISBN: 1592000908
EAN: 2147483647
Year: 2003
Pages: 147
Authors: Ron Penton

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net