Reputation:
Are there any c++ networking libs that are very useful and robust? and libs to help them be run better? something like automatically endian conversion when using <<, blocking reads until the struct or w/e your reading completely transfers, something to help debug your protocol, etc
Upvotes: 1
Views: 232
Reputation: 10123
I like the ADAPTIVE Communication Environment. It has built in constructs for just about all the networking patterns. I particullarly like ACE_Task. It makes message passing SO much easier.
Upvotes: 1
Reputation: 3113
I'd recommend sockets... its quite easy to make cross-platform code for Win32/*nix if you use it, although it is quite low level it does provide blocking functionality (i.e. halts execution until message is recieved). There are a ton of tutorials for sockets programming available... just google for "sockets" or "WinSock" (the Win32 flavour).
http://www.google.co.uk/search?q=sockets+programming
It won't deal with endian-ness for you, but there are a number of simple ways around this problem, like using a signature byte/word (e.g. 0xC1 (11000001b), 0x00C1) at the start of a message to determine the endian-ness.
Upvotes: 0
Reputation: 507065
Have you had a look at Boost.Asio? It's a networking library supporting both asynchronous and synchronous operation. I've made some experiments with it in the past, and found it quite useful.
Upvotes: 3