Skip to main content
GameDev.net gamedev.net
🔒 Locked

I need a tutorial...

Started by silverphyre673 Nov 29, 2004 at 10:39 PM 3 replies 850+ views
Original Post
silverphyre673
silverphyre673
Is there a decent online tutorial somewhere on how to manage packets in c++. I've heard of sockets, but don't know what they are. I just need to send things like char arrays and integers across the net. If there is an easy-to-follow tutorial somewhere out there, could I get a link to it? Thanks.
my siteGenius is 1% inspiration and 99% perspiration
Mattman
Mattman
I don't have a tutorial link for you, but I can at least give you a little info about sockets/packets.

Sockets are used to connect one computer to another via a specified port. One system is considered the "host" or "server", and the other is the "client". The host listens for connection (typically a socket class or library will have a listen() function) that will listen for connections on a specified port. The client can then attempt to connect to a host (typically via a connect() function) given an IP address and port number. If a listening socket hears a connection request from a client socket, the host can then accept the connection. It can, however, deny (via a close() call or something similar) the connection.

When a connection is established, packets can be delivered to and from both the client and the host. A packet is some sort of information delivered through the socket connection that must be deciphered by the recipient. This can be something as simple as plaintext, but can also include binary data (such as programs being downloaded via FTP), secured data (such as data sent via HTTPS), or anything else that the recipient is expecting.

Hope this helps a little....
hplus0603
hplus0603
You could also start at the Forum FAQ and go from there.
enum Bool { True, False, FileNotFound };
smr
smr
You may also want to try SDL_Net. It makes networking very easy.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.