Search code examples
cunixposixbsd

C network programming?


What libraries are the best (in terms of performance) for network programming in C on windows and UNIX?

I'm quite interested with respect to high frequency trading.

I have heard about BSD and POSIX but I wasnt sure if there were faster performance-specific libraries?


Solution

  • The fastest way would be to use the OS's networking functions: socket(), setsockopt(), connect(), listen(), send(), recv() etc. etc.

    There are subtle differences between them on several OS's.

    To cope with this, there are wrappers around them in several libraries, e.g. in Qt (at least, IIRC). I don't think anything will noticeably slow down if you use them...