#include <cascade/util/CascadeHTTPStream.h>
Inheritance diagram for CascadeHTTPStream:
Public Member Functions | |
CascadeHTTPStream () | |
CascadeHTTPStream (const char *pURL) | |
virtual | ~CascadeHTTPStream () |
virtual bool | Open (const char *pURL) |
virtual bool | Close () |
void | SetConnectTimeout (u32 inMicroseconds) |
void | SetSendTimeout (u32 inMicroseconds) |
void | SetReceiveTimeout (u32 inMicroseconds) |
void | SetUserAgent (const CascadeString &inUserAgentString) |
bool | GetResponseHeaderValue (const char *pResponseHeaderKey, CascadeString &value) const |
virtual u64 | GetSize () |
virtual u64 | GetPosition () |
virtual bool | SeekToPosition (u64 nPosition) |
virtual u32 | ReadBytes (u32 nBytes, void *pBuff) |
virtual bool | ForceSeekToPosition (u64 nPosition) |
Protected Member Functions | |
virtual void | AddHeaders (CascadeHTTPClient *inClient) |
virtual void | OnHTTPConnectionEstablished (CascadeHTTPClient *inClient) |
CascadeHTTPStream allows streams to be read from http. The main purpose of CascadeHTTPStream is allow you to use http when a CascadeStream object is required.
|
default constructor This constructor is light weight. |
|
parameterized constructor This constructor creates an http connection and attaches it to the stream when constructed.
|
|
the destructor This destructor is light weight. |
|
|
|
closes the http connection if open
|
|
|
|
returns the current position in the stream Returns the current position in the stream.
Implements CascadeStream. |
|
gets the value of the supplied response header Sets the string value to the contents of the response header named in pResponseHeaderKey. The stream must have been opened successfully.
|
|
returns the size of the stream Returns number of total bytes in the stream. The size doesn't change as bytes are read or the position is seeked to.
Implements CascadeStream. |
|
|
|
creates an http connection and attaches it to the stream
|
|
reads bytes from the stream Reads bytes from the stream.
Implements CascadeStream. |
|
seeks to a position in the stream SeekToPositions seeks to a byte position in the stream.
Implements CascadeStream. |
|
sets the connect timeout for this stream Sets the connect timeout for this stream. By default, the timeout is zero, meaning that network accesses are blocking calls.
|
|
sets the receive timeout for this stream Sets the receive timeout for this stream. By default, the timeout is zero, meaning that network accesses are blocking calls.
|
|
sets the send timeout for this stream Sets the send timeout for this stream. By default, the timeout is zero, meaning that network accesses are blocking calls.
|
|
sets the user agent string for this stream Sets the user agent string for this stream.
|