#include <stream.hpp>
Public Member Functions | |
stream (session const &s, saga::url url=saga::url()) | |
Initializes a client client stream, for later connection to an server. | |
stream (saga::url url) | |
Initializes a client client stream, for later connection to an server. | |
stream () | |
Initializes a client client stream, for later connection to an server. | |
stream (saga::object const &o) | |
Initializes a client client stream, for later connection to an server. | |
~stream (void) | |
Destroys an stream object. | |
stream & | operator= (saga::object const &o) |
Brief description starts here. | |
saga::url | get_url () const |
Get the URL used for creating this stream. | |
saga::context | get_context () const |
Return remote authorization info. | |
saga::context | connect () |
Establishes a connection to the target defined during the construction of the stream. | |
std::vector < saga::stream::activity > | wait (saga::stream::activity what, double timeout=-1.0) |
Check if stream is ready for reading/writing, or if it has entered an error state. | |
void | close (double timeout=0.0) |
Closes an active connection. | |
saga::ssize_t | read (saga::mutable_buffer buffer, saga::ssize_t length=0) |
Read a raw buffer from stream. | |
saga::ssize_t | write (saga::const_buffer buffer, saga::ssize_t length=0) |
Write a raw buffer to stream. | |
Static Public Member Functions | |
static stream | create (session const &s, saga::url name=saga::url()) |
Factory function resembling stream(session, url) constructor. | |
static stream | create (saga::url name=saga::url()) |
Factory function resembling stream(url) constructor. | |
template<typename Tag> | |
static saga::task | create (saga::url name=saga::url()) |
saga::stream::stream::stream | ( | saga::url | url | ) | [explicit] |
saga::stream::stream::stream | ( | void | ) |
saga::stream::stream::stream | ( | saga::object const & | o | ) | [explicit] |
static stream saga::stream::stream::create | ( | session const & | s, | |
saga::url | name = saga::url() | |||
) | [inline, static] |
Factory function resembling stream(session, url) constructor.
Factory function resembling stream(url) constructor.
static saga::task saga::stream::stream::create | ( | saga::url | name = saga::url() |
) | [inline, static] |
stream & saga::stream::stream::operator= | ( | saga::object const & | o | ) |
Brief description starts here.
saga::url saga::stream::stream::get_url | ( | ) | const [inline] |
saga::context saga::stream::stream::get_context | ( | ) | const [inline] |
saga::context saga::stream::stream::connect | ( | ) | [inline] |
Establishes a connection to the target defined during the construction of the stream.
std::vector<saga::stream::activity> saga::stream::stream::wait | ( | saga::stream::activity | what, | |
double | timeout = -1.0 | |||
) | [inline] |
void saga::stream::stream::close | ( | double | timeout = 0.0 |
) | [inline] |
Closes an active connection.
saga::ssize_t saga::stream::stream::read | ( | saga::mutable_buffer | buffer, | |
saga::ssize_t | length = 0 | |||
) | [inline] |
Read a raw buffer from stream.
length | Maximum number of bytes that can be copied in to the buffer. | |
buffer | Empty buffer passed in to get filled |
saga::ssize_t saga::stream::stream::write | ( | saga::const_buffer | buffer, | |
saga::ssize_t | length = 0 | |||
) | [inline] |
Write a raw buffer to stream.
length | Number of bytes of data in the buffer | |
buffer | Raw array containing data that will be sent out via socket |