Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


libcliser: C++ library for creating multithreaded TCP servers


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 igagis   Members   -  Reputation: 137

Like
1Likes
Like

Posted 24 March 2011 - 04:20 PM

Hi,

presenting my C++ library which offers a network layer for TCP server and manages network sockets in separate threads.

libcliser

It has thin area of use but offers simple API.
The library is cross platform, tested to work under linux and Windows. Under Windows it was tested using MinGW compiler, but in theory should work with MSVC compiler too.
Any feedback is welcome.

Sponsor:

#2 hplus0603   Moderators   -  Reputation: 5723

Like
1Likes
Like

Posted 24 March 2011 - 04:56 PM

Hi,

presenting my C++ library which offers a network layer for TCP server and manages network sockets in separate threads.

libcliser

It has thin area of use but offers simple API.
The library is cross platform, tested to work under linux and Windows. Under Windows it was tested using MinGW compiler, but in theory should work with MSVC compiler too.
Any feedback is welcome.


Don't take this the wrong way, but I'd like to understand why you made this library, and made it public?
Specifically, I'd like you to answer these questions:

What's wrong with boost::asio?
What's wrong with SDL_net, or plib, or one of a zillion other "portability" network libraries?
Or RakNet, or Enet, or ACE, or ICE, or one of a zillion other higher-level networking libraries?
Why are you serving sockets in separate threads, when that's well known to be inefficient? (see the FAQ)

Your answer may be "because I wanted to learn networking for real," which is a fine motivation, but it's unlikely that someone's learning project can become a solid foundation for a distributed/networked application, so making it a public library seems weird in that case.
enum Bool { True, False, FileNotFound };

#3 owl   Banned   -  Reputation: 364

Like
-1Likes
Like

Posted 24 March 2011 - 05:52 PM

Well, it is better than nothing. I'm sure he had the best intentions.
I like the Walrus best.

#4 igagis   Members   -  Reputation: 137

Like
1Likes
Like

Posted 25 March 2011 - 04:16 AM

Well, I think my library offers simpler API which allows faster start implementing the server logic instead of coping with sockets-shmockets and other stuff... At least that was my intention, to create a library which would hide all the networking layer.

Regarding serving sockets in separate threads... I'm serving a number of sockets in one thread, and there can be several such threads. So, it is not a one socket per one thread. This maybe not the most efficient approach but in my opinion it provides enough efficiency in majority of cases.

Anyway, thanks for the feedback, this is what I made this post for.

#5 hplus0603   Moderators   -  Reputation: 5723

Like
0Likes
Like

Posted 25 March 2011 - 03:10 PM

Well, I think my library offers simpler API which allows faster start implementing the server logic instead of coping with sockets-shmockets and other stuff... At least that was my intention, to create a library which would hide all the networking layer.


So, you still haven't answered the differentiation quesiton.


Why your library, instead of boost::ASIO, or any one of a zillion of other, high performance, robust, networking libraries?
enum Bool { True, False, FileNotFound };

#6 flodihn   Members   -  Reputation: 254

Like
0Likes
Like

Posted 25 March 2011 - 04:37 PM

I think the "Announcement" section would be a better place for this post.

#7 wood_brian   Banned   -  Reputation: 197

Like
0Likes
Like

Posted 25 March 2011 - 08:09 PM

So, you still haven't answered the differentiation quesiton.


Why your library, instead of boost::ASIO, or any one of a zillion of other, high performance, robust, networking libraries?


I'm for being free to work on what you find interesting. One lib that you didn't mention is Poco. If he wants his library to do well though he'll eventually have to answer the questions you've posed. It is a tough space to break into.


Brian Wood
Ebenezer Enterprises
http://webEbenezer.net

#8 nfries88   Members   -  Reputation: 259

Like
-1Likes
Like

Posted 25 March 2011 - 09:48 PM

I've analyzed the source code very shortly.
As it turns out, this is merely a slim layer over another library named ting that does all the actual work. In short, he's posted the equivalent of maybe a week or two of work (assuming he was unfamiliar with Ting and asynchronous design concepts to begin with), which is based on likely months or even years of other people's much more intensive work and knowledge.
Looking for paid or open-source C++ programming work. Been programming since 2005. No degree.

#9 Drew_Benton   Crossbones+   -  Reputation: 1727

Like
1Likes
Like

Posted 25 March 2011 - 11:48 PM

igagis is the author of ting ;)

"But I, being poor, have only my dreams. I have spread my dreams under your feet; tread softly, because you tread on my dreams." - William Butler Yeats




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS