The stream_server object establishes a listening/server object that waits for client connections. More...
#include <stream_server.hpp>
Public Member Functions | |
server (session const &s, saga::url url=saga::url()) | |
Creates a new stream_server object. | |
server (saga::url url) | |
Creates a new stream_server object. | |
server () | |
Creates a new stream_server object. | |
server (saga::object const &o) | |
Creates a new stream_server object. | |
~server (void) | |
Destructor for stream_server object. | |
server & | operator= (saga::object const &o) |
Brief description starts here. | |
saga::url | get_url () const |
Get the URL to be used to connect to this server. | |
saga::stream::stream | connect (double timeout=-1.0) |
Establishes a connection to this service. | |
saga::stream::stream | serve (double timeout=0.0) |
Wait for incoming client connections. | |
void | close (double timeout=0.0) |
Closes this stream service. | |
Static Public Member Functions | |
static server | create (session const &s, saga::url name=saga::url()) |
Factory function resembling server(session, url) constructor. | |
static server | create (saga::url name=saga::url()) |
Factory function resembling server(url) constructor. | |
template<typename Tag > | |
static saga::task | create (saga::url name=saga::url()) |
The stream_server object establishes a listening/server object that waits for client connections.
It can only be used as a factory for client sockets. It doesnŐt do any read/write I/O.
Definition at line 52 of file stream_server.hpp.
Creates a new stream_server object.
Definition at line 59 of file stream_server.cpp.
saga::stream::server::server | ( | saga::url | url | ) | [explicit] |
Creates a new stream_server object.
Definition at line 66 of file stream_server.cpp.
saga::stream::server::server | ( | void | ) |
Creates a new stream_server object.
Definition at line 73 of file stream_server.cpp.
saga::stream::server::server | ( | saga::object const & | o | ) | [explicit] |
Creates a new stream_server object.
Definition at line 125 of file stream_server.cpp.
References saga::BadParameter, saga::object::get_type(), and saga::object::StreamServer.
saga::stream::server::~server | ( | void | ) |
Destructor for stream_server object.
Definition at line 106 of file stream_server.cpp.
static server saga::stream::server::create | ( | session const & | s, | |
saga::url | name = saga::url() | |||
) | [inline, static] |
Factory function resembling server(session, url) constructor.
Definition at line 122 of file stream_server.hpp.
Factory function resembling server(url) constructor.
Definition at line 132 of file stream_server.hpp.
static saga::task saga::stream::server::create | ( | saga::url | name = saga::url() |
) | [inline, static] |
Definition at line 137 of file stream_server.hpp.
server & saga::stream::server::operator= | ( | saga::object const & | o | ) |
Brief description starts here.
Definition at line 134 of file stream_server.cpp.
saga::url saga::stream::server::get_url | ( | ) | const [inline] |
Get the URL to be used to connect to this server.
Definition at line 154 of file stream_server.hpp.
References saga::task::get_result().
saga::stream::stream saga::stream::server::connect | ( | double | timeout = -1.0 |
) | [inline] |
Establishes a connection to this service.
Definition at line 163 of file stream_server.hpp.
References saga::task::get_result().
saga::stream::stream saga::stream::server::serve | ( | double | timeout = 0.0 |
) | [inline] |
Wait for incoming client connections.
timeout | Number of seconds to wait for client |
Definition at line 177 of file stream_server.hpp.
References saga::task::get_result().
void saga::stream::server::close | ( | double | timeout = 0.0 |
) | [inline] |
Closes this stream service.
Definition at line 189 of file stream_server.hpp.
References saga::task::get_result().