Game Development Reference
In-Depth Information
Understanding networking
The concept of networking has been around for quite a while but if we are going to write
code which relies on information from another machine, it is important to grasp the main
concept behind a network. Ultimately, networking is about sending and receiving data to
and from different machines. That data can be used for a variety of things—simply redir-
ecting it in another direction (like a router), performing a task and returning the result, up-
dating something locally in a database, and so on.
Starting with the basics, if two systems want to exchange data between each other, they
need to be on the same network (or on separate networks that are connected to each other).
That is as simple as hooking an Ethernet cable from one network card to the other, creating
a fairly simple ad-hoc network (only between two machines), but still being able to serve
its purpose just fine. If all networks were so simple, the process of interacting between ma-
chines would be much simpler, but ultimately networks wouldn't be as useful as they are
When we start to introduce concepts such as more than two machines on the same network,
multiple networks connected to each other, long distances between machines and so on, we
start running into problems. The solutions involve clever engineering, which we will not
get into, but the result is a structured layered networking model, which enables us to avoid
some of the low-level problems that are inherent in networking. This is what a simplified
version of the model looks like:
Search WWH ::

Custom Search