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
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
For C++
http://pocoproject.org/documentation/index.html
http://www.boost.org/
Of course you can always look here:
http://stackoverflow.com/questions/1587252/what-is-a-popular-multi-platform-free-and-open-source-socket-library
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.
I would suggest Qt. It has a great slot/signal paradigm that makes threaded socket programming easy.
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.