Sign in to follow this  
silverphyre673

I need a tutorial...

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this