jmasterx
jmasterx

Reputation: 54103

Crossplatform alternative to Winsock?

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

Answers (4)

Poni
Poni

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

Nathan Osman
Nathan Osman

Reputation: 73165

I would suggest Qt. It has a great slot/signal paradigm that makes threaded socket programming easy.

Upvotes: 2

caf
caf

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

Related Questions