Reputation: 54103
I basically am looking for a cross platform way to do basic things such as accept connections and send and receive data. What library would work in Linux, Windows and Mac?
Thanks
Upvotes: 2
Views: 5373
Reputation: 11317
Boost's ASIO is a good choise; I'd suggest struggle to understand it and stick to it - it covers most of the things you'll want.
Upvotes: 1
Reputation: 73165
I would suggest Qt. It has a great slot/signal paradigm that makes threaded socket programming easy.
Upvotes: 2
Reputation: 239011
Winsock is based on the BSD sockets API, which is natively supported on both Linux and OS X (ie. socket()
, connect()
, accept()
, send()
, recv()
, select()
and so forth).
There are some differences, but they are such that it's usually easier to port from Winsock to true BSD sockets than the reverse.
Upvotes: 10
Reputation: 24375
For C++
http://pocoproject.org/documentation/index.html
http://www.boost.org/
Of course you can always look here:
What is a popular, multi-platform, free and open source socket library
Upvotes: 5