background preloader

Computer Networking

Facebook Twitter

Source Multiplayer Networking. Multiplayer games based on the Source Engine use a Client-Server networking architecture.

Source Multiplayer Networking

Usually a server is a dedicated host that runs the game and is authoritative about world simulation, game rules, and player input processing. A client is a player's computer connected to a game server. The client and server communicate with each other by sending small data packets at a high frequency (usually 20 to 30 packets per second). A client receives the current world state from the server and generates video and audio output based on these updates. The client also samples data from input devices (keyboard, mouse, microphone, etc.) and sends these input samples back to the server for further processing.

Network bandwidth is limited, so the server can't send a new update packet to all clients for every single world change. Basic networking The server simulates the game in discrete time steps called ticks. Clients usually have only a limited amount of available bandwidth. Tickrate 66 Tickrate 30. The C10K problem. [Help save the best Linux news source on the web -- subscribe to Linux Weekly News!] It's time for web servers to handle ten thousand clients simultaneously, don't you think? After all, the web is a big place now. And computers are big, too. You can buy a 1000MHz machine with 2 gigabytes of RAM and an 1000Mbit/sec Ethernet card for $1200 or so. Let's see - at 20000 clients, that's 50KHz, 100Kbytes, and 50Kbits/sec per client. In 1999 one of the busiest ftp sites, cdrom.com, actually handled 10000 clients simultaneously through a Gigabit Ethernet pipe.

And the thin client model of computing appears to be coming back in style -- this time with the server out on the Internet, serving thousands of clients. With that in mind, here are a few notes on how to configure operating systems and write code to support thousands of clients. Contents Related Sites See Nick Black's execellent Fast UNIX Servers page for a circa-2009 look at the situation. Book to Read First I/O frameworks I/O Strategies. W. Richard Stevens' Home Page. W.

W. Richard Stevens' Home Page

Richard Stevens' Home Page Books by Richard Stevens (reverse chronological) Papers by Richard Stevens (reverse chronological) Papers of Others (alphabetical) Some of the following are papers that I have referenced in my books, often Usenet postings, that are not easily obtainable. Typesetting This section contains some notes on how I write books. Miscellaneous Source Code This used to be a tar file containing the Posix.1g getaddrinfo() function that supports both IPv4 and IPv6. IP Multicasting Information IP multicast API information. Biography I received the B.S.E. in Aerospace Engineering from the University of Michigan (1973), and the M.S. (1978) and Ph.D. (1982) in Systems Engineering (image processing major, physiology minor) from the University of Arizona. I have had many lives as a programmer. In what seems to be a previous life (1970s) I was a flight instructor, although most of my flying these days is in the back of a commercial airliner or down the steeps at Taos Ski Valley.

S Guide to Network Programming. (Click here for other guides!)

s Guide to Network Programming

Hello, one and all! This is my little how-to guide on network programming using Internet sockets, or "sockets programming", for those of you who prefer it. The sockets API, though started by the Berkeley folk, has been ported to many many platforms, including Unix, Linux, and even Windows. Unfortunately, it can be a little, um, "much" to digest the API, but as long as you know some C or C++, this guide should springboard you into the realm of network programming with hopefully as little hassle as humanly possible!

What's Here for Readers: Errata (mistakes? HTML:One section per page (read online) All on one page (read online) One section per page (tarball for download) One section per page (zipfile for download) All on one page (tarball for download) All on one page (zipfile for download) Mirrors: Let me know if you have mirrored the site. kfbk.net (Germany) tudelft.nl (Netherlands) retran.com (USA) Translations! What's Here for Translators and Writers: