#include <Pt/Http/IOStream.h>
Stream of an upgraded HTTP connection. More...
Inherits BasicIOStream< char >, and Connectable.
Public Member Functions | |
| IOStream (Connection *conn) | |
| Constructs the stream for conn. | |
| virtual | ~IOStream () |
| Destructor. | |
| void | beginInput () |
| Begins an asynchronous read. | |
| size_t | endInput () |
| Ends an asynchronous read. | |
| void | beginOutput () |
| Begins an asynchronous write. | |
| size_t | endOutput () |
| Ends an asynchronous write. | |
| Pt::Signal & | inputReady () |
| Returns the signal emitted when input is ready. | |
| Pt::Signal & | outputReady () |
| Returns the signal emitted when output is ready. | |
| void | cancel () |
| Cancels pending I/O. | |
| std::streamsize | peeksome (char *buffer, std::streamsize n) |
| Peeks bytes in the stream buffer. | |
| std::streamsize | writesome (char *buffer, std::streamsize n) |
| Write as much data as fits in buffer. | |
| BasicStreamBuffer< char > * | buffer () |
| Returns the buffer. | |
| void | setBuffer (BasicStreamBuffer< char > *sb) |
| Sets the buffer. | |
IOStream is the connection after an HTTP upgrade, not the body of a request or reply. Service::upgradeRequested() provides it, and WebSocket::accept() takes it.
|
inherited |
The number of bytes that can be peeked depends on the current stream buffer get area and maybe less than requested, similar to istream::readsome().