Network programming?

hey everyone, how to use c++ to program network for a multiplayer online game or how would i go about this?
:O
Well, networking is not part of the standard library, so you need an external API.

-There is: SFML (most simple to start off with, but not as efficient as other api's, but the other api's are confusing enough to make your code less efficient than just using this one)
-Boost Asio(most hardest to set up, but similar to bsd sockets(beej's tutorial), can be async, and works on linux, windows, and mac)
-winsock & iocp(windows only)

And a few other ones here and there.
You have to decide what information needs to be shared. Networking libraries allow you to share that information.

It helps if you understand something of how networking works (for example, it would help if you understand ip addressing), but you don't need too much information if you want to stream packets across computers.

The is a good sockets reference: http://beej.us/guide/bgnet/

A sample TCP server: http://www.boost.org/doc/libs/1_49_0/doc/html/boost_asio/example/iostreams/daytime_server.cpp
The matching TCP client: http://www.boost.org/doc/libs/1_49_0/doc/html/boost_asio/example/iostreams/daytime_client.cpp
You can use the POCO lib. It offers a lot especially for network programming:

http://pocoproject.org/
thank you everyone! ^_^
Topic archived. No new replies allowed.