8 #ifndef __WVSTREAMCLONE_H
9 #define __WVSTREAMCLONE_H
77 virtual size_t uread(
void *buf,
size_t size);
78 virtual size_t uwrite(
const void *buf,
size_t size);
79 virtual bool isok()
const;
80 virtual int geterr()
const;
91 void close_callback();
96 const char *wstype()
const {
return my_type; }
Base class for different address types, each of which will have the ability to convert itself to/from...
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
WvStreamClone simply forwards all requests to the "cloned" stream.
virtual void setclone(IWvStream *clone)
WvStreamClone takes ownership of the given stream; it will WVRELEASE() the stream when you setclone()...
virtual ~WvStreamClone()
The WvStreamClone destructor.
virtual void pre_select(SelectInfo &si)
pre_select() sets up for eventually calling ::select().
virtual void close()
Close this stream.
WvStreamClone(IWvStream *_cloned=NULL)
Constructs the stream, then calls setclone(_cloned).
virtual const WvAddr * src() const
get the remote address from which the last data block was received.
virtual bool isok() const
return true if the stream is actually usable right now
virtual void execute()
The callback() function calls execute(), and then calls the user- specified callback if one is define...
virtual void noread()
Shuts down the reading side of the stream.
virtual void nowrite()
Shuts down the writing side of the stream.
virtual size_t uread(void *buf, size_t size)
unbuffered I/O functions; these ignore the buffer, which is handled by read().
virtual bool post_select(SelectInfo &si)
post_select() is called after ::select(), and returns true if this object is now ready.
virtual int geterr() const
If isok() is false, return the system error number corresponding to the error, -1 for a special error...
virtual bool flush_internal(time_t msec_timeout)
WvStream overrides.
virtual size_t uwrite(const void *buf, size_t size)
unbuffered I/O functions; these ignore the buffer, which is handled by write().
Unified support for streams, that is, sequences of bytes that may or may not be ready for read/write ...
WvString is an implementation of a simple and efficient printable-string class.
the data structure used by pre_select()/post_select() and internally by select().