WvIPRawStream can send and receive packets on a connectionless IP socket. More...
#include <wvipraw.h>
Public Member Functions | |
| WvIPRawStream (const WvIPAddr &_local, const WvIPAddr &_rem, int ip_protocol=IPPROTO_RAW) | |
| connect a new socket | |
| const WvAddr * | local () const |
| virtual const WvAddr * | src () const |
| return the remote address (source of incoming packets, target of outgoing packets). | |
| void | setdest (const WvIPAddr &_remaddr) |
| void | enable_broadcasts () |
| const char * | wstype () const |
| int | getrfd () const |
| Returns the Unix file descriptor for reading from this stream. | |
| int | getwfd () const |
| Returns the Unix file descriptor for writing to this stream. | |
| int | getfd () const |
| Returns the Unix file descriptor for reading and writing. | |
| void | set_nonblock (bool nonblock) |
| Make the fds on this stream blocking or non-blocking. | |
| void | set_close_on_exec (bool close_on_exec) |
| Make the fds on this stream close-on-exec or not. | |
| virtual void | close () |
| Closes the file descriptors. | |
| virtual bool | isok () const |
| return true if the stream is actually usable right now | |
| virtual void | pre_select (SelectInfo &si) |
| pre_select() sets up for eventually calling select(). | |
| void | pre_select (SelectInfo &si, const SelectRequest &r) |
| A more convenient version of pre_select() usable for overriding the 'want' value temporarily. | |
| virtual bool | post_select (SelectInfo &si) |
| post_select() is called after select(), and returns true if this object is now ready. | |
| bool | post_select (SelectInfo &si, const SelectRequest &r) |
| A more convenient version of post_select() usable for overriding the 'want' value temporarily. | |
| virtual void | maybe_autoclose () |
| Auto-close the stream if the time is right. | |
| virtual void | seterr (int _errnum) |
| Override seterr() from WvError so that it auto-closes the stream. | |
| void | seterr (WvStringParm specialerr) |
| void | seterr (WVSTRING_FORMAT_DECL) |
| void | seterr (const WvErrorBase &err) |
| virtual size_t | read (void *buf, size_t count) |
| read a data block on the stream. | |
| virtual size_t | read (WvBuf &outbuf, size_t count) |
| Reads up to 'count' bytes of data from the stream into the buffer. | |
| virtual void | unread (WvBuf &outbuf, size_t count) |
| Puts data back into the stream's internal buffer. | |
| virtual size_t | write (const void *buf, size_t count) |
| Write data to the stream. | |
| virtual size_t | write (WvBuf &inbuf, size_t count=INT_MAX) |
| Writes data to the stream from the given buffer. | |
| size_t | write (WvStringParm s) |
| print a preformatted WvString to the stream. | |
| void | outbuf_limit (size_t size) |
| set the maximum size of outbuf, beyond which a call to write() will return 0. | |
| virtual void | noread () |
| Shuts down the reading side of the stream. | |
| virtual void | nowrite () |
| Shuts down the writing side of the stream. | |
| virtual bool | isreadable () |
| Returns true if the stream is readable. | |
| virtual bool | iswritable () |
| Returns true if the stream is writable (without using the outbuf). | |
| char * | getline (time_t wait_msec=0, char separator= '\n', int readahead=1024) |
| Read up to one line of data from the stream and return a pointer to the internal buffer containing this line. | |
| char * | getline (int wait_msec, char separator= '\n', int readahead=1024) |
| Auto-convert int to time_t. | |
| char * | getline (double wait_msec, char separator= '\n', int readahead=1024) |
| Auto-convert double to time_t. | |
| char * | blocking_getline (time_t wait_msec, int separator= '\n', int readahead=1024) |
| This is a version of getline() that allows you to block for more data to arrive. | |
| char * | continue_getline (time_t wait_msec, int separator= '\n', int readahead=1024) |
| This is a version of blocking_getline() that uses continue_select to avoid blocking other streams. | |
| void | queuemin (size_t count) |
| force read() to not return any bytes unless 'count' bytes can be read at once. | |
| void | drain () |
| drain the input buffer (read and discard data until select(0) returns false) | |
| void | delay_output (bool is_delayed) |
| force write() to always buffer output. | |
| void | auto_flush (bool is_automatic) |
| if true, force write() to call flush() each time, the default behavour. | |
| virtual bool | flush (time_t msec_timeout) |
| flush the output buffer, if we can do it without delaying more than msec_timeout milliseconds at a time. | |
| virtual bool | should_flush () |
| Returns true if we want to flush the output buffer right now. | |
| void | flush_then_close (int msec_timeout) |
| flush the output buffer automatically as select() is called. | |
| void | xpre_select (SelectInfo &si, const SelectRequest &r) |
| Like pre_select(), but still exists even if you override the other pre_select() in a subclass. | |
| bool | xpost_select (SelectInfo &si, const SelectRequest &r) |
| Like post_select(), but still exists even if you override the other post_select() in a subclass. | |
| bool | select (time_t msec_timeout) |
| Return true if any of the requested features are true on the stream. | |
| bool | select (time_t msec_timeout, bool readable, bool writable, bool isex=false) |
| This version of select() sets forceable==false, so we use the exact readable/writable/isexception options provided. | |
| void | runonce (time_t msec_timeout=-1) |
| Exactly the same as: if (select(timeout)) callback();. | |
| IWvStream::SelectRequest | get_select_request () |
| Use get_select_request() to save the current state of the selection state of this stream. | |
| void | force_select (bool readable, bool writable, bool isexception=false) |
| Use force_select() to force one or more particular modes (readable, writable, or isexception) to true when selecting on this stream. | |
| void | undo_force_select (bool readable, bool writable, bool isexception=false) |
| Undo a previous force_select() - ie. | |
| bool | continue_select (time_t msec_timeout) |
| return to the caller from execute(), but don't really return exactly; this uses WvCont::yield() to return to the caller of callback() without losing our place in execute() itself. | |
| void | terminate_continue_select () |
| you MUST run this from your destructor if you use continue_select(), or very weird things will happen if someone deletes your object while in continue_select(). | |
| void | setcallback (IWvStreamCallback _callfunc) |
| define the callback function for this stream, called whenever the callback() member is run, and passed the 'userdata' pointer. | |
| IWvStreamCallback | setreadcallback (IWvStreamCallback _callback) |
| Sets a callback to be invoked when the stream is readable. | |
| IWvStreamCallback | setwritecallback (IWvStreamCallback _callback) |
| Sets a callback to be invoked when the stream is writable. | |
| IWvStreamCallback | setexceptcallback (IWvStreamCallback _callback) |
| Sets a callback to be invoked when the stream is in exception state. | |
| IWvStreamCallback | setclosecallback (IWvStreamCallback _callback) |
| Sets a callback to be invoked on close(). | |
| void | autoforward (WvStream &s) |
| set the callback function for this stream to an internal routine that auto-forwards all incoming stream data to the given output stream. | |
| void | noautoforward () |
| Stops autoforwarding. | |
| void * | _callwrap (void *) |
| A wrapper that's compatible with WvCont, but calls the "real" callback. | |
| void | _callback () |
| Actually call the registered callfunc and execute(). | |
| virtual void | callback () |
| if the stream has a callback function defined, call it now. | |
| void | alarm (time_t msec_timeout) |
| set an alarm, ie. | |
| time_t | alarm_remaining () |
| return the number of milliseconds remaining before the alarm will go off; -1 means no alarm is set (infinity), 0 means the alarm has been hit and will be cleared by the next callback(). | |
| size_t | print (WvStringParm s) |
| size_t | print (WVSTRING_FORMAT_DECL) |
| preformat and write() a string. | |
| size_t | operator() (WvStringParm s) |
| size_t | operator() (WVSTRING_FORMAT_DECL) |
| const char * | wsname () const |
| void | set_wsname (WvStringParm wsname) |
| void | set_wsname (WVSTRING_FORMAT_DECL) |
| WSID | wsid () const |
| virtual WvString | getattr (WvStringParm name) const |
| virtual int | geterr () const |
| If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. | |
| virtual WvString | errstr () const |
| void | seterr_both (int _errnum, WvStringParm specialerr) |
| void | seterr_both (int _errnum, WVSTRING_FORMAT_DECL) |
| void | noerr () |
| Reset our error state - there's no error condition anymore. | |
| virtual unsigned int | addRef ()=0 |
| Indicate you are using this object. | |
| virtual unsigned int | release ()=0 |
| Indicate that you are finished using this object. | |
| virtual IObject * | getInterface (const UUID &)=0 |
| Returns the requested XPLC interface. | |
| virtual IWeakRef * | getWeakRef ()=0 |
| Return a weak reference to this object. | |
Static Public Member Functions | |
| static void | autoforward_callback (WvStream &input, WvStream &output) |
| static IWvStream * | find_by_wsid (WSID wsid) |
| static IWvStream * | create (WvStringParm moniker, IObject *obj=NULL) |
| static WvString | strerror (int errnum) |
| A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32). | |
Public Attributes | |
| WvStream * | read_requires_writable |
| If this is set, select() doesn't return true for read unless the given stream also returns true for write. | |
| WvStream * | write_requires_readable |
| If this is set, select() doesn't return true for write unless the given stream also returns true for read. | |
| bool | uses_continue_select |
| If this is set, enables the use of continue_select(). | |
| size_t | personal_stack_size |
| Specifies the stack size to reserve for continue_select(). | |
| bool | alarm_was_ticking |
| This will be true during callback execution if the callback was triggered by the alarm going off. | |
| bool | stop_read |
| True if noread()/nowrite()/close() have been called, respectively. | |
| bool | stop_write |
| bool | closed |
Protected Member Functions | |
| virtual size_t | uread (void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by read(). | |
| virtual size_t | uwrite (const void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by write(). | |
| void | setfd (int fd) |
| Sets the file descriptor for both reading and writing. | |
| void | setattr (WvStringParm name, WvStringParm value) |
| void | _build_selectinfo (SelectInfo &si, time_t msec_timeout, bool readable, bool writable, bool isexcept, bool forceable) |
| int | _do_select (SelectInfo &si) |
| bool | _process_selectinfo (SelectInfo &si, bool forceable) |
| WvStringParm s) | |
| size_t | operator() (WVSTRING_FORMAT_DECL) |
| const char * | wsname () const |
| void | set_wsname (WvStringParm wsname) |
| void | set_wsname (WVSTRING_FORMAT_DECL) |
| WSID | wsid () const |
| virtual WvString | getattr (WvStringParm name) const |
| virtual int | geterr () const |
| If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. | |
| virtual WvString | errstr () const |
| void | seterr_both (int _errnum, WvStringParm specialerr) |
| void | seterr_both (int _errnum, WVSTRING_FORMAT_DECL) |
| void | noerr () |
| Reset our error state - there's no error condition anymore. | |
| virtual unsigned int | addRef ()=0 |
| Indicate you are using this object. | |
| virtual unsigned int | release ()=0 |
| Indicate that you are finished using this object. | |
| virtual IObject * | getInterface (const UUID &)=0 |
| Returns the requested XPLC interface. | |
| virtual IWeakRef * | getWeakRef ()=0 |
| Return a weak reference to this object. | |
Static Public Member Functions | |
| static void | autoforward_callback (WvStream &input, WvStream &output) |
| static IWvStream * | find_by_wsid (WSID wsid) |
| static IWvStream * | create (WvStringParm moniker, IObject *obj=NULL) |
| static WvString | strerror (int errnum) |
| A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32). | |
Public Attributes | |
| WvStream * | read_requires_writable |
| If this is set, select() doesn't return true for read unless the given stream also returns true for write. | |
| WvStream * | write_requires_readable |
| If this is set, select() doesn't return true for write unless the given stream also returns true for read. | |
| bool | uses_continue_select |
| If this is set, enables the use of continue_select(). | |
| size_t | personal_stack_size |
| Specifies the stack size to reserve for continue_select(). | |
| bool | alarm_was_ticking |
| This will be true during callback execution if the callback was triggered by the alarm going off. | |
| bool | stop_read |
| True if noread()/nowrite()/close() have been called, respectively. | |
| bool | stop_write |
| bool | closed |
Protected Member Functions | |
| virtual size_t | uread (void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by read(). | |
| virtual size_t | uwrite (const void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by write(). | |
| void | setfd (int fd) |
| Sets the file descriptor for both reading and writing. | |
| void | setattr (WvStringParm name, WvStringParm value) |
| void | _build_selectinfo (SelectInfo &si, time_t msec_timeout, bool readable, bool writable, bool isexcept, bool forceable) |
| int | _do_select (SelectInfo &si) |
| bool | _process_selectinfo (SelectInfo &si, bool forceable) |
| WvStringParm s) | |
| size_t | operator() (WVSTRING_FORMAT_DECL) |
| const char * | wsname () const |
| void | set_wsname (WvStringParm wsname) |
| void | set_wsname (WVSTRING_FORMAT_DECL) |
| WSID | wsid () const |
| virtual WvString | getattr (WvStringParm name) const |
| virtual int | geterr () const |
| If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. | |
| virtual WvString | errstr () const |
| void | seterr_both (int _errnum, WvStringParm specialerr) |
| void | seterr_both (int _errnum, WVSTRING_FORMAT_DECL) |
| void | noerr () |
| Reset our error state - there's no error condition anymore. | |
| virtual unsigned int | addRef ()=0 |
| Indicate you are using this object. | |
| virtual unsigned int | release ()=0 |
| Indicate that you are finished using this object. | |
| virtual IObject * | getInterface (const UUID &)=0 |
| Returns the requested XPLC interface. | |
| virtual IWeakRef * | getWeakRef ()=0 |
| Return a weak reference to this object. | |
Static Public Member Functions | |
| static void | autoforward_callback (WvStream &input, WvStream &output) |
| static IWvStream * | find_by_wsid (WSID wsid) |
| static IWvStream * | create (WvStringParm moniker, IObject *obj=NULL) |
| static WvString | strerror (int errnum) |
| A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32). | |
Public Attributes | |
| WvStream * | read_requires_writable |
| If this is set, select() doesn't return true for read unless the given stream also returns true for write. | |
| WvStream * | write_requires_readable |
| If this is set, select() doesn't return true for write unless the given stream also returns true for read. | |
| bool | uses_continue_select |
| If this is set, enables the use of continue_select(). | |
| size_t | personal_stack_size |
| Specifies the stack size to reserve for continue_select(). | |
| bool | alarm_was_ticking |
| This will be true during callback execution if the callback was triggered by the alarm going off. | |
| bool | stop_read |
| True if noread()/nowrite()/close() have been called, respectively. | |
| bool | stop_write |
| bool | closed |
Protected Member Functions | |
| virtual size_t | uread (void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by read(). | |
| virtual size_t | uwrite (const void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by write(). | |
| void | setfd (int fd) |
| Sets the file descriptor for both reading and writing. | |
| void | setattr (WvStringParm name, WvStringParm value) |
| void | _build_selectinfo (SelectInfo &si, time_t msec_timeout, bool readable, bool writable, bool isexcept, bool forceable) |
| int | _do_select (SelectInfo &si) |
| bool | _process_selectinfo (SelectInfo &si, bool forceable) |
| WvStringParm s) | |
| size_t | operator() (WVSTRING_FORMAT_DECL) |
| const char * | wsname () const |
| void | set_wsname (WvStringParm wsname) |
| void | set_wsname (WVSTRING_FORMAT_DECL) |
| WSID | wsid () const |
| virtual WvString | getattr (WvStringParm name) const |
| virtual int | geterr () const |
| If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. | |
| virtual WvString | errstr () const |
| void | seterr_both (int _errnum, WvStringParm specialerr) |
| void | seterr_both (int _errnum, WVSTRING_FORMAT_DECL) |
| void | noerr () |
| Reset our error state - there's no error condition anymore. | |
| virtual unsigned int | addRef ()=0 |
| Indicate you are using this object. | |
| virtual unsigned int | release ()=0 |
| Indicate that you are finished using this object. | |
| virtual IObject * | getInterface (const UUID &)=0 |
| Returns the requested XPLC interface. | |
| virtual IWeakRef * | getWeakRef ()=0 |
| Return a weak reference to this object. | |
Static Public Member Functions | |
| static void | autoforward_callback (WvStream &input, WvStream &output) |
| static IWvStream * | find_by_wsid (WSID wsid) |
| static IWvStream * | create (WvStringParm moniker, IObject *obj=NULL) |
| static WvString | strerror (int errnum) |
| A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32). | |
Public Attributes | |
| WvStream * | read_requires_writable |
| If this is set, select() doesn't return true for read unless the given stream also returns true for write. | |
| WvStream * | write_requires_readable |
| If this is set, select() doesn't return true for write unless the given stream also returns true for read. | |
| bool | uses_continue_select |
| If this is set, enables the use of continue_select(). | |
| size_t | personal_stack_size |
| Specifies the stack size to reserve for continue_select(). | |
| bool | alarm_was_ticking |
| This will be true during callback execution if the callback was triggered by the alarm going off. | |
| bool | stop_read |
| True if noread()/nowrite()/close() have been called, respectively. | |
| bool | stop_write |
| bool | closed |
Protected Member Functions | |
| virtual size_t | uread (void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by read(). | |
| virtual size_t | uwrite (const void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by write(). | |
| void | setfd (int fd) |
| Sets the file descriptor for both reading and writing. | |
| void | setattr (WvStringParm name, WvStringParm value) |
| void | _build_selectinfo (SelectInfo &si, time_t msec_timeout, bool readable, bool writable, bool isexcept, bool forceable) |
| int | _do_select (SelectInfo &si) |
| bool | _process_selectinfo (SelectInfo &si, bool forceable) |
| WvStringParm s) | |
| size_t | operator() (WVSTRING_FORMAT_DECL) |
| const char * | wsname () const |
| void | set_wsname (WvStringParm wsname) |
| void | set_wsname (WVSTRING_FORMAT_DECL) |
| WSID | wsid () const |
| virtual WvString | getattr (WvStringParm name) const |
| virtual int | geterr () const |
| If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. | |
| virtual WvString | errstr () const |
| void | seterr_both (int _errnum, WvStringParm specialerr) |
| void | seterr_both (int _errnum, WVSTRING_FORMAT_DECL) |
| void | noerr () |
| Reset our error state - there's no error condition anymore. | |
| virtual unsigned int | addRef ()=0 |
| Indicate you are using this object. | |
| virtual unsigned int | release ()=0 |
| Indicate that you are finished using this object. | |
| virtual IObject * | getInterface (const UUID &)=0 |
| Returns the requested XPLC interface. | |
| virtual IWeakRef * | getWeakRef ()=0 |
| Return a weak reference to this object. | |
Static Public Member Functions | |
| static void | autoforward_callback (WvStream &input, WvStream &output) |
| static IWvStream * | find_by_wsid (WSID wsid) |
| static IWvStream * | create (WvStringParm moniker, IObject *obj=NULL) |
| static WvString | strerror (int errnum) |
| A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32). | |
Public Attributes | |
| WvStream * | read_requires_writable |
| If this is set, select() doesn't return true for read unless the given stream also returns true for write. | |
| WvStream * | write_requires_readable |
| If this is set, select() doesn't return true for write unless the given stream also returns true for read. | |
| bool | uses_continue_select |
| If this is set, enables the use of continue_select(). | |
| size_t | personal_stack_size |
| Specifies the stack size to reserve for continue_select(). | |
| bool | alarm_was_ticking |
| This will be true during callback execution if the callback was triggered by the alarm going off. | |
| bool | stop_read |
| True if noread()/nowrite()/close() have been called, respectively. | |
| bool | stop_write |
| bool | closed |
Protected Member Functions | |
| virtual size_t | uread (void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by read(). | |
| virtual size_t | uwrite (const void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by write(). | |
| void | setfd (int fd) |
| Sets the file descriptor for both reading and writing. | |
| void | setattr (WvStringParm name, WvStringParm value) |
| void | _build_selectinfo (SelectInfo &si, time_t msec_timeout, bool readable, bool writable, bool isexcept, bool forceable) |
| int | _do_select (SelectInfo &si) |
| bool | _process_selectinfo (SelectInfo &si, bool forceable) |
| WvStringParm s) | |
| size_t | operator() (WVSTRING_FORMAT_DECL) |
| const char * | wsname () const |
| void | set_wsname (WvStringParm wsname) |
| void | set_wsname (WVSTRING_FORMAT_DECL) |
| WSID | wsid () const |
| virtual WvString | getattr (WvStringParm name) const |
| virtual int | geterr () const |
| If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. | |
| virtual WvString | errstr () const |
| void | seterr_both (int _errnum, WvStringParm specialerr) |
| void | seterr_both (int _errnum, WVSTRING_FORMAT_DECL) |
| void | noerr () |
| Reset our error state - there's no error condition anymore. | |
| virtual unsigned int | addRef ()=0 |
| Indicate you are using this object. | |
| virtual unsigned int | release ()=0 |
| Indicate that you are finished using this object. | |
| virtual IObject * | getInterface (const UUID &)=0 |
| Returns the requested XPLC interface. | |
| virtual IWeakRef * | getWeakRef ()=0 |
| Return a weak reference to this object. | |
Static Public Member Functions | |
| static void | autoforward_callback (WvStream &input, WvStream &output) |
| static IWvStream * | find_by_wsid (WSID wsid) |
| static IWvStream * | create (WvStringParm moniker, IObject *obj=NULL) |
| static WvString | strerror (int errnum) |
| A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32). | |
Public Attributes | |
| WvStream * | read_requires_writable |
| If this is set, select() doesn't return true for read unless the given stream also returns true for write. | |
| WvStream * | write_requires_readable |
| If this is set, select() doesn't return true for write unless the given stream also returns true for read. | |
| bool | uses_continue_select |
| If this is set, enables the use of continue_select(). | |
| size_t | personal_stack_size |
| Specifies the stack size to reserve for continue_select(). | |
| bool | alarm_was_ticking |
| This will be true during callback execution if the callback was triggered by the alarm going off. | |
| bool | stop_read |
| True if noread()/nowrite()/close() have been called, respectively. | |
| bool | stop_write |
| bool | closed |
Protected Member Functions | |
| virtual size_t | uread (void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by read(). | |
| virtual size_t | uwrite (const void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by write(). | |
| void | setfd (int fd) |
| Sets the file descriptor for both reading and writing. | |
| void | setattr (WvStringParm name, WvStringParm value) |
| void | _build_selectinfo (SelectInfo &si, time_t msec_timeout, bool readable, bool writable, bool isexcept, bool forceable) |
| int | _do_select (SelectInfo &si) |
| bool | _process_selectinfo (SelectInfo &si, bool forceable) |
| WvStringParm s) | |
| size_t | operator() (WVSTRING_FORMAT_DECL) |
| const char * | wsname () const |
| void | set_wsname (WvStringParm wsname) |
| void | set_wsname (WVSTRING_FORMAT_DECL) |
| WSID | wsid () const |
| virtual WvString | getattr (WvStringParm name) const |
| virtual int | geterr () const |
| If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. | |
| virtual WvString | errstr () const |
| void | seterr_both (int _errnum, WvStringParm specialerr) |
| void | seterr_both (int _errnum, WVSTRING_FORMAT_DECL) |
| void | noerr () |
| Reset our error state - there's no error condition anymore. | |
| virtual unsigned int | addRef ()=0 |
| Indicate you are using this object. | |
| virtual unsigned int | release ()=0 |
| Indicate that you are finished using this object. | |
| virtual IObject * | getInterface (const UUID &)=0 |
| Returns the requested XPLC interface. | |
| virtual IWeakRef * | getWeakRef ()=0 |
| Return a weak reference to this object. | |
Static Public Member Functions | |
| static void | autoforward_callback (WvStream &input, WvStream &output) |
| static IWvStream * | find_by_wsid (WSID wsid) |
| static IWvStream * | create (WvStringParm moniker, IObject *obj=NULL) |
| static WvString | strerror (int errnum) |
| A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32). | |
Public Attributes | |
| WvStream * | read_requires_writable |
| If this is set, select() doesn't return true for read unless the given stream also returns true for write. | |
| WvStream * | write_requires_readable |
| If this is set, select() doesn't return true for write unless the given stream also returns true for read. | |
| bool | uses_continue_select |
| If this is set, enables the use of continue_select(). | |
| size_t | personal_stack_size |
| Specifies the stack size to reserve for continue_select(). | |
| bool | alarm_was_ticking |
| This will be true during callback execution if the callback was triggered by the alarm going off. | |
| bool | stop_read |
| True if noread()/nowrite()/close() have been called, respectively. | |
| bool | stop_write |
| bool | closed |
Protected Member Functions | |
| virtual size_t | uread (void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by read(). | |
| virtual size_t | uwrite (const void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by write(). | |
| void | setfd (int fd) |
| Sets the file descriptor for both reading and writing. | |
| void | setattr (WvStringParm name, WvStringParm value) |
| void | _build_selectinfo (SelectInfo &si, time_t msec_timeout, bool readable, bool writable, bool isexcept, bool forceable) |
| int | _do_select (SelectInfo &si) |
| bool | _process_selectinfo (SelectInfo &si, bool forceable) |
| WvStringParm s) | |
| size_t | operator() (WVSTRING_FORMAT_DECL) |
| const char * | wsname () const |
| void | set_wsname (WvStringParm wsname) |
| void | set_wsname (WVSTRING_FORMAT_DECL) |
| WSID | wsid () const |
| virtual WvString | getattr (WvStringParm name) const |
| virtual int | geterr () const |
| If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. | |
| virtual WvString | errstr () const |
| void | seterr_both (int _errnum, WvStringParm specialerr) |
| void | seterr_both (int _errnum, WVSTRING_FORMAT_DECL) |
| void | noerr () |
| Reset our error state - there's no error condition anymore. | |
| virtual unsigned int | addRef ()=0 |
| Indicate you are using this object. | |
| virtual unsigned int | release ()=0 |
| Indicate that you are finished using this object. | |
| virtual IObject * | getInterface (const UUID &)=0 |
| Returns the requested XPLC interface. | |
| virtual IWeakRef * | getWeakRef ()=0 |
| Return a weak reference to this object. | |
Static Public Member Functions | |
| static void | autoforward_callback (WvStream &input, WvStream &output) |
| static IWvStream * | find_by_wsid (WSID wsid) |
| static IWvStream * | create (WvStringParm moniker, IObject *obj=NULL) |
| static WvString | strerror (int errnum) |
| A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32). | |
Public Attributes | |
| WvStream * | read_requires_writable |
| If this is set, select() doesn't return true for read unless the given stream also returns true for write. | |
| WvStream * | write_requires_readable |
| If this is set, select() doesn't return true for write unless the given stream also returns true for read. | |
| bool | uses_continue_select |
| If this is set, enables the use of continue_select(). | |
| size_t | personal_stack_size |
| Specifies the stack size to reserve for continue_select(). | |
| bool | alarm_was_ticking |
| This will be true during callback execution if the callback was triggered by the alarm going off. | |
| bool | stop_read |
| True if noread()/nowrite()/close() have been called, respectively. | |
| bool | stop_write |
| bool | closed |
Protected Member Functions | |
| virtual size_t | uread (void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by read(). | |
| virtual size_t | uwrite (const void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by write(). | |
| void | setfd (int fd) |
| Sets the file descriptor for both reading and writing. | |
| void | setattr (WvStringParm name, WvStringParm value) |
| void | _build_selectinfo (SelectInfo &si, time_t msec_timeout, bool readable, bool writable, bool isexcept, bool forceable) |
| int | _do_select (SelectInfo &si) |
| bool | _process_selectinfo (SelectInfo &si, bool forceable) |
| WvStringParm s) | |
| size_t | operator() (WVSTRING_FORMAT_DECL) |
| const char * | wsname () const |
| void | set_wsname (WvStringParm wsname) |
| void | set_wsname (WVSTRING_FORMAT_DECL) |
| WSID | wsid () const |
| virtual WvString | getattr (WvStringParm name) const |
| virtual int | geterr () const |
| If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file. | |
| virtual WvString | errstr () const |
| void | seterr_both (int _errnum, WvStringParm specialerr) |
| void | seterr_both (int _errnum, WVSTRING_FORMAT_DECL) |
| void | noerr () |
| Reset our error state - there's no error condition anymore. | |
| virtual unsigned int | addRef ()=0 |
| Indicate you are using this object. | |
| virtual unsigned int | release ()=0 |
| Indicate that you are finished using this object. | |
| virtual IObject * | getInterface (const UUID &)=0 |
| Returns the requested XPLC interface. | |
| virtual IWeakRef * | getWeakRef ()=0 |
| Return a weak reference to this object. | |
Static Public Member Functions | |
| static void | autoforward_callback (WvStream &input, WvStream &output) |
| static IWvStream * | find_by_wsid (WSID wsid) |
| static IWvStream * | create (WvStringParm moniker, IObject *obj=NULL) |
| static WvString | strerror (int errnum) |
| A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32). | |
Public Attributes | |
| WvStream * | read_requires_writable |
| If this is set, select() doesn't return true for read unless the given stream also returns true for write. | |
| WvStream * | write_requires_readable |
| If this is set, select() doesn't return true for write unless the given stream also returns true for read. | |
| bool | uses_continue_select |
| If this is set, enables the use of continue_select(). | |
| size_t | personal_stack_size |
| Specifies the stack size to reserve for continue_select(). | |
| bool | alarm_was_ticking |
| This will be true during callback execution if the callback was triggered by the alarm going off. | |
| bool | stop_read |
| True if noread()/nowrite()/close() have been called, respectively. | |
| bool | stop_write |
| bool | closed |
Protected Member Functions | |
| virtual size_t | uread (void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by read(). | |
| virtual size_t | uwrite (const void *buf, size_t count) |
| unbuffered I/O functions; these ignore the buffer, which is handled by write(). | |
| void | setfd (int fd) |
| Sets the file descriptor for both reading and writing. | |
| void | setattr (WvStringParm name, WvStringParm value) |
| void | _build_selectinfo (SelectInfo &si, time_t msec_timeout, bool readable, bool writable, bool isexcept, bool forceable) |
| int | _do_select (SelectInfo &si) |
| bool | _process_selectinfo (SelectInfo &si, bool forceable) |
| WvStringParm s) | |
| size_t | operator() (WVSTRING_FORMAT_DECL) |
| const char * | wsname () const |
| void | set_wsname (WvStringParm wsname) |
| void | set_wsname (WVSTRING_FORMAT_DECL) |
| WSID | wsid () const |
| virtual WvString | getattr (WvStringParm name) const |
| virtual int | geterr () const |
| If | |