Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cromulent

macrumors 604
Original poster
Oct 2, 2006
6,829
1,132
The Land of Hope and Glory
Does anyone know if there is a C equivalent to Boost Asio at all? By that I mean a cross platform library that allows async network IO using the best method for each platform (kqueue on Mac and FreeBSD and epoll on Linux etc).

I haven't been able to find anything from Googling, does anyone have any suggestions at all?
 
Alas I have already looked at that but the real time extensions to the POSIX standard are for files only. At least that is what the man page for aio_write() says.

Wouldn't any type of file descriptor work, such as sockets and so on?
 
Wouldn't any type of file descriptor work, such as sockets and so on?

Oops sorry for the late reply. I completely missed your response.

I took the man page at face value to be honest. Anyway I spent a little more time investigating this issue and basically decided that it came down to writing the entire server process in C (which is not a task I particularly relish) or using a language like Erlang which seems to be much better at handling such systems.

Another plus side to using Erlang is that it seems to be the first functional language I have really 'got'. I'm really enjoying the change from C / Java / C++ / Python. It's a bit of an eye opening experience. I might jump into Prolog and (finally, I've been meaning to do it for about 2 years now) sit down and learn Haskell next :).
 
Does anyone know if there is a C equivalent to Boost Asio at all? By that I mean a cross platform library that allows async network IO using the best method for each platform (kqueue on Mac and FreeBSD and epoll on Linux etc).

I haven't been able to find anything from Googling, does anyone have any suggestions at all?

Why would you want to use a "C equivalent" of this library? If it is available on the Mac, then just use it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.