SAGA C++ API 1.6
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:

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.
serveroperator= (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.

Definition at line 52 of file stream_server.hpp.


Constructor & Destructor Documentation

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

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.


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.

Definition at line 122 of file stream_server.hpp.

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

Factory function resembling server(url) constructor.

Definition at line 132 of file stream_server.hpp.

template<typename Tag >
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.

Returns:
String containing the URL of the connection

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.

Parameters:
timeoutNumber of seconds to wait for client
Returns:
New connected stream object

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


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines