#include <wvstreamlist.h>
Inheritance diagram for WvStreamList:
Public Member Functions | |
WvStreamList () | |
virtual | ~WvStreamList () |
virtual bool | isok () const |
virtual bool | pre_select (SelectInfo &si) |
virtual bool | post_select (SelectInfo &si) |
virtual void | execute () |
WvStreamList () | |
virtual | ~WvStreamList () |
virtual bool | isok () const |
virtual bool | pre_select (SelectInfo &si) |
virtual bool | post_select (SelectInfo &si) |
virtual void | execute () |
Public Attributes | |
bool | auto_prune |
Protected Attributes | |
WvStreamListBase | sure_thing |
Definition at line 19 of file include/wvstreamlist.h.
|
Definition at line 19 of file wvstreamlist.cc. References auto_prune. |
|
Definition at line 25 of file wvstreamlist.cc. |
|
|
|
|
|
The callback() function calls execute(), and then calls the user- specified callback if one is defined. Do not call execute() directly; call callback() instead. The default execute() function does nothing. Note: If you override this function in a derived class, you must call the parent execute() yourself from the derived class. Reimplemented from WvStream. |
|
The callback() function calls execute(), and then calls the user- specified callback if one is defined. Do not call execute() directly; call callback() instead. The default execute() function does nothing. Note: If you override this function in a derived class, you must call the parent execute() yourself from the derived class. Reimplemented from WvStream. Definition at line 108 of file wvstreamlist.cc. References WvStream::callback(), WvListBase::count(), WvStream::execute(), sure_thing, TRACE, and WvList< WvStream >::zap(). |
|
return true if the stream is actually usable right now Reimplemented from WvStream. |
|
return true if the stream is actually usable right now Reimplemented from WvStream. Definition at line 31 of file wvstreamlist.cc. |
|
post_select() is called after ::select(), and returns true if this object is now ready. Usually this is done by checking for this object in the read, write, and except lists in the SelectInfo structure. If you want to do it in some other way, you should usually do it in pre_select() instead. (post_select() _only_ gets called if ::select() returned true for _some_ stream or another.) You may also want to do extra maintenance functions here; for example, the standard WvStream::post_select tries to flush outbuf if it's nonempty. WvTCPConn might retry connect() if it's waiting for a connection to be established. Reimplemented from WvStream. |
|
post_select() is called after ::select(), and returns true if this object is now ready. Usually this is done by checking for this object in the read, write, and except lists in the SelectInfo structure. If you want to do it in some other way, you should usually do it in pre_select() instead. (post_select() _only_ gets called if ::select() returned true for _some_ stream or another.) You may also want to do extra maintenance functions here; for example, the standard WvStream::post_select tries to flush outbuf if it's nonempty. WvTCPConn might retry connect() if it's waiting for a connection to be established. Reimplemented from WvStream. Definition at line 82 of file wvstreamlist.cc. References WvList< WvStream >::append(), WvStream::force, WvListBase::isempty(), WvStream::isok(), WvStream::post_select(), and sure_thing. |
|
pre_select() sets up for eventually calling ::select(). It adds the right fds to the read, write, and except lists in the SelectInfo struct. Returns true if we already know this stream is ready, and there's no need to actually do a real ::select(). Some streams, such as timers, can be implemented by _only_ either returning true or false here after doing a calculation, and never actually adding anything to the SelectInfo. You can add your stream to any of the lists even if readable, writable, or isexception isn't set. This is what force_select() does. You can also choose not to add yourself to the list if you know it would be useless right now. pre_select() is only called if isok() is true. pre_select() is allowed to reduce msec_timeout (or change it if it's -1). However, it's not allowed to _increase_ msec_timeout. Reimplemented from WvStream. |
|
pre_select() sets up for eventually calling ::select(). It adds the right fds to the read, write, and except lists in the SelectInfo struct. Returns true if we already know this stream is ready, and there's no need to actually do a real ::select(). Some streams, such as timers, can be implemented by _only_ either returning true or false here after doing a calculation, and never actually adding anything to the SelectInfo. You can add your stream to any of the lists even if readable, writable, or isexception isn't set. This is what force_select() does. You can also choose not to add yourself to the list if you know it would be useless right now. pre_select() is only called if isok() is true. pre_select() is allowed to reduce msec_timeout (or change it if it's -1). However, it's not allowed to _increase_ msec_timeout. Reimplemented from WvStream. Definition at line 37 of file wvstreamlist.cc. References WvStream::alarm_remaining(), WvList< WvStream >::append(), WvStream::force, WvListBase::isempty(), WvStream::isok(), WvStream::pre_select(), sure_thing, and WvList< WvStream >::zap(). |
|
Definition at line 29 of file streams/wvstreamlist.h. Referenced by WvStreamList(). |
|
Definition at line 32 of file streams/wvstreamlist.h. Referenced by execute(), post_select(), and pre_select(). |