Reputation: 22556
I am looking for a NIO type of library for C. I want to implement a multi threaded UDP network server that will have a lot of clients connecting to it.
Instead of attempting to code my own program to handle packets and 'connections'. I thought I would have a look if there is not already an existing library that has been tested and build for scalability and high performance.
I have found a few for Java but none for C. such as Apache Mina.
I am hoping that some one out there knows of a good one that may assist me. Thaks
Upvotes: 1
Views: 2759
Reputation: 107
If you are using Linux I strongly recommend you to use the POSIX API. It gives you resources for multithreading and networking acrosss any Linux box.
Upvotes: 1
Reputation: 13947
It sounds like you want something to abstract select()
, poll()
, or whatever the most efficient mechanism is for your platform.
Have you looked at libevent and libev? There is a nice writeup here.
Upvotes: 4
Reputation: 22241
First of all, C has no classes. Secondly, C provides you with everything you need to implement a scalable and high performance solution. It's more low level than java's NIO, but there are good tutorials out there in google.
And if you want a library - try boosts' asio. It is C++, but perhaps you can use it.
Upvotes: 1