# saga::stream::server Class Reference

The stream_server object establishes a listening/server object that waits for client connections. More...

`#include <stream_server.hpp>`

Inheritance diagram for saga::stream::server:

[legend]

List of all members.

## 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())

## Detailed Description

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.

## Constructor & Destructor Documentation

saga::stream::server::server | ( | session const & | s,
|  | saga::url | url = `saga::url()` |
| ) |  |  | `[explicit]`

Creates a new stream_server object.

saga::stream::server::server | ( | saga::url | url | ) | `[explicit]`

Creates a new stream_server object.

saga::stream::server::server | ( | void |  | ) |

Creates a new stream_server object.

saga::stream::server::server | ( | saga::object const & | o | ) | `[explicit]`

Creates a new stream_server object.

saga::stream::server::~server | ( | void |  | ) |

Destructor for stream_server object.

## Member Function Documentation

static server saga::stream::server::create | ( | session const & | s,
|  | saga::url | name = `saga::url()` |
| ) |  |  | `[inline, static]`

Factory function resembling server(session, url) constructor.

static server saga::stream::server::create | ( | saga::url | name = `saga::url()` | ) | `[inline, static]`

Factory function resembling server(url) constructor.

template<typename Tag>

static saga::task saga::stream::server::create | ( | saga::url | name = `saga::url()` | ) | `[inline, static]`

server & saga::stream::server::operator= | ( | saga::object const & | o | ) |

Brief description starts here.

saga::url saga::stream::server::get_url | ( |  | ) | const`[inline]`

Get the URL to be used to connect to this server.

Returns:
  String containing the URL of the connection

saga::stream::stream saga::stream::server::connect | ( | double | timeout = `-1.0` | ) | `[inline]`

Establishes a connection to this service.

References saga::task::get_result().

saga::stream::stream saga::stream::server::serve | ( | double | timeout = `0.0` | ) | `[inline]`

Wait for incoming client connections.

Parameters:

  | timeout | Number of seconds to wait for client

Returns:
  New connected stream object

void saga::stream::server::close | ( | double | timeout = `0.0` | ) | `[inline]`

Closes this stream service.

The documentation for this class was generated from the following files:

- stream_server.hpp
- stream_server.cpp