Overview
Features
Download
Documentation
Community
Add-Ons & Services

Does POCO supports select() loops?

A general discussion forum.

Does POCO supports select() loops?

Postby joede » 19 Feb 2009, 11:21

Hi again.

The reference manual is to big to find the right class. So I have to ask here.

I need a select() based loop to wait for data from several resources (serial port, video device,...). Neither Events nor Notifications seems to be the right place to start.

Please can you point me to the correct class?

Thanks.
joede
 
Posts: 3
Joined: 19 Feb 2009, 10:48

Re: Does POCO supports select() loops?

Postby alex » 19 Feb 2009, 13:48

Currently, there is only select() (or poll(), where available) for sockets. I did start some work on the functionality you are looking for, but it is not available to the public yet (and I can make no timeframe promises). If you would be interested in contributing, email me at(alex, dot(appinf, us))
alex
 
Posts: 1130
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Does POCO supports select() loops?

Postby joede » 19 Feb 2009, 16:40

alex wrote:Currently, there is only select() (or poll(), where available) for sockets.


Does this mean, the handling is integrated (hard coded) into this part of the class tree?

alex wrote:I did start some work on the functionality you are looking for, but it is not available to the public yet (and I can make no timeframe promises).


Which approach do you use? Do you plan a single dispatcher like the loop/dispatch functions of C-Libaries like libevent or libev?

alex wrote: If you would be interested in contributing, email me at(alex, dot(appinf, us))


That would be possible. I'm developing embedded systems most of the time. In most cases I use C, but with ARM-based cores, the usage of C++ is getting more. I've written a few (portable) desktop applications with fltk (http://www.fltk.org). POCO is on my todo list for a long time now, but I had not have the time to start with it.

Nevertheless, if you have some code to get a first impression, I will have a look at it. I'll send you an email...

By the way... Can you point me to some samples or papers to get a better overview over the class hierarchy and the design principles of POCO? The reference is flat and too large. ;-)

And one more question... Why don't you support pkg-config? I'm using debian linux, and the official poco packages neither have support for pkg-config, nor are the POCO makefile rules included.
joede
 
Posts: 3
Joined: 19 Feb 2009, 10:48

Re: Does POCO supports select() loops?

Postby alex » 20 Feb 2009, 00:11

joede wrote:Does this mean, the handling is integrated (hard coded) into this part of the class tree?


Yes, look at Reactor in the Net library.

joede wrote:Which approach do you use? Do you plan a single dispatcher like the loop/dispatch functions of C-Libaries like libevent or libev?


For the time being, only reactor. We also have thread-based async IO code. Proactor is certainly desirable, but no work has been done in that direction yet. We planned to wrap libevent, but after looking a bit more closely into it, I am inclined to write it from the scratch. It is not a small feat, though, as things are wildly different across platforms.

joede wrote:By the way... Can you point me to some samples or papers to get a better overview over the class hierarchy and the design principles of POCO? The reference is flat and too large. ;-)


Yes - http://pocoproject.org/documentation/

Some wiki documents are not optimally formatted due to recent migration from Tiki, but they are readable nevertheless.

joede wrote:And one more question... Why don't you support pkg-config? I'm using debian linux, and the official poco packages neither have support for pkg-config, nor are the POCO makefile rules included.


Ah, well, it's a same old story - we do not have enough resources (i.e. people/time/money). As people around the world are learning these days - the fact that desires are unlimited but means are scarce can not be beaten.
alex
 
Posts: 1130
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Does POCO supports select() loops?

Postby Hitnrun » 19 Sep 2012, 15:36

Old thread digging, but I am having a nearly same problem.

I need to read from a socket and at the same time wait for a NotificationQueue. Protocol classes are read from the socket and put on a NotificationQueue, and the GUI thread can post protocol classes on a second NotificationQueue, so the socket can send them.

Now I would need to read with a timeout, and in these timeouts I would check and send from the second queue, which would introduce delays on the sending process.

Is there another way to do this?
Hitnrun
 
Posts: 20
Joined: 01 Apr 2009, 18:32


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron