#include <wvhttp.h>
Inheritance diagram for WvHTTPStream:
Public Types | |
enum | State { Resolving = 0, Connecting, ReadHeader1, ReadHeader, ReadData, Done } |
enum | State { Resolving = 0, Connecting, ReadHeader1, ReadHeader, ReadData, Done } |
Public Methods | |
WvHTTPStream (WvURL &_url) | |
~WvHTTPStream () | |
virtual bool | isok () const |
virtual int | geterr () const |
virtual const char * | errstr () const |
virtual bool | pre_select (SelectInfo &si) |
virtual size_t | uread (void *buf, size_t count) |
WvHTTPStream (WvURL &_url) | |
~WvHTTPStream () | |
virtual bool | isok () const |
virtual int | geterr () const |
virtual const char * | errstr () const |
virtual bool | pre_select (SelectInfo &si) |
virtual size_t | uread (void *buf, size_t count) |
Public Attributes | |
WvHTTPHeaderDict | headers |
WvHTTPHeaderDict | client_headers |
size_t | num_received |
WvURL & | url |
WvTCPConn * | http |
State | state |
WvURL & | url |
WvTCPConn * | http |
Definition at line 59 of file include/wvhttp.h.
|
Definition at line 62 of file ipstreams/wvhttp.h. |
|
Definition at line 62 of file include/wvhttp.h. |
|
do not delete '_url' before you delete this stream! Definition at line 122 of file wvhttp.cc. References http, num_received, WvURL::resolve, Resolving, state, and url. |
|
Definition at line 136 of file wvhttp.cc. References http. |
|
do not delete '_url' before you delete this stream! |
|
|
|
Reimplemented from WvStreamClone. |
|
Reimplemented from WvStreamClone. Definition at line 160 of file wvhttp.cc. References WvURL::errstr, WvStreamClone::errstr, WvURL::isok, and url. |
|
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. If isok() is true, returns an undefined number. Reimplemented from WvStreamClone. |
|
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. If isok() is true, returns an undefined number. Reimplemented from WvStreamClone. Definition at line 151 of file wvhttp.cc. References WvStreamClone::geterr. |
|
return true if the stream is actually usable right now Reimplemented from WvStreamClone. |
|
return true if the stream is actually usable right now Reimplemented from WvStreamClone. Definition at line 142 of file wvhttp.cc. References WvURL::isok, WvStreamClone::isok, and url. Referenced by pre_select. |
|
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 WvStreamClone. |
|
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 WvStreamClone. Definition at line 171 of file wvhttp.cc. References client_headers, Connecting, WvURL::getaddr, WvStream::geterr, WvURL::getfile, http, WvTCPConn::isconnected, WvStreamClone::isok, WvURL::isok, isok, WvStreamClone::pre_select, WvStream::print, ReadHeader1, WvURL::resolve, Resolving, WvStream::select, WvStream::seterr, state, and url. |
|
unbuffered I/O functions; these ignore the buffer, which is handled by read(). Don't call these functions unless you have a _really_ good reason. Reimplemented from WvStreamClone. |
|
unbuffered I/O functions; these ignore the buffer, which is handled by read(). Don't call these functions unless you have a _really_ good reason. Reimplemented from WvStreamClone. Definition at line 215 of file wvhttp.cc. References WvHTTPHeaderDict::add, Connecting, Done, WvStream::getline, headers, http, num_received, WvStream::read, ReadData, ReadHeader, ReadHeader1, Resolving, WvStream::seterr, state, and trim_string. |
|
Definition at line 65 of file ipstreams/wvhttp.h. Referenced by pre_select. |
|
Definition at line 64 of file ipstreams/wvhttp.h. Referenced by uread. |
|
Definition at line 82 of file ipstreams/wvhttp.h. |
|
Definition at line 82 of file include/wvhttp.h. Referenced by pre_select, uread, WvHTTPStream, and ~WvHTTPStream. |
|
Definition at line 66 of file ipstreams/wvhttp.h. Referenced by uread, and WvHTTPStream. |
|
Definition at line 83 of file ipstreams/wvhttp.h. Referenced by pre_select, uread, and WvHTTPStream. |
|
Definition at line 81 of file ipstreams/wvhttp.h. |
|
Definition at line 81 of file include/wvhttp.h. Referenced by errstr, isok, pre_select, and WvHTTPStream. |