Game Development Reference
In-Depth Information
Table 19.4 Useful Programs and Files for Internet Work
Name
Description
ping
This little program attempts to send information to another computer
and tells you the time in milliseconds it took for the packets to arrive.
The other computer must be set up to answer, which might not be the
case if the computer is behind a firewall.
netstat
This program can show you the state of current sockets on your com-
puter. It can tell you if they are listening for connections, connected, or
about to be closed.
tracert
This program tells you what Internet hops your packets have to make
before they are received by the host computer.
Telnet
This program attaches to a host computer and sends/receives text mes-
sages. It can be great for debugging network code if your debug code
can send/receive in text mode.
hosts
This is a file that holds locally overridden DNS information. If you want to
force a DNS name like goober.mcfly.com to be any legal IP address, you
can do it in this file. On Windows machines, look for it in the system32\
drivers\etc directory. Windows machines also have a file lmhosts , which
stands for LanManHosts, which is used by the Windows peer networking
protocol, or SMB protocol. UNIX machines running the free Samba server
may also have an lmhosts file.
Sockets API
Well, I
ve now given you enough knowledge to be dangerous. All you need is some
source code. The sockets API is divided into a few different useful areas of code.
'
n Utility functions
n Domain Name Service (DNS) functions
n Initialization and shutdown
n Creating sockets and setting socket options
n Connecting client sockets to a server
n Server functions
n Reading and writing from sockets
 
 
Search WWH ::




Custom Search