communicate Class Reference

Class that handles sockets. More...

#include <communicate.h>

List of all members.

Public Member Functions

 communicate ()
 ~communicate ()
 Free session data.
void set_dir (std::string dir)
channelreading (const std::string file, sigc::signal< void, channel * > handler)
 Read a new data file.
channelwriting (const std::string file)
 Write to a file.
channelclient (const std::string host, int port, sigc::signal< void, channel * > handler)
 Read data from a specified connection.
bool reconnect (channel *ch)
 Reconnect a client.
void server (int port, sigc::signal< void, channel * > handler)
 Listen to this specific socket for requests.
channeltls_client (const std::string host, int port, sigc::signal< void, channel * > handler)
 Connect to a tls connection.
void tls_server (int port, sigc::signal< void, channel * > handler)
 Listen with a tls sever for tls clients to connect.
void tls_reload ()
 Read the dhfile and rsafile into the tls structures.
void poll ()
 read and write data, including cleanup after closed connections or timeouts
void complete (int timeout)
 open communication till the connection is closed or the timeout is reached
void server_close ()
 Indicate a shutdown of the server.

Public Attributes

std::string user
 user id for connection
std::string session
 Session id.
long sessnr
 Session nr.


Detailed Description

Class that handles sockets.

Constructor & Destructor Documentation

communicate::communicate (  ) 

communicate::~communicate (  ) 

Free session data.


Member Function Documentation

void communicate::set_dir ( std::string  dir  ) 

channel * communicate::reading ( const std::string  file,
sigc::signal< void, channel * >  handler 
)

Read a new data file.

Returns:
Returns 0 on failure to connect.

channel * communicate::writing ( const std::string  file  ) 

Write to a file.

Returns:
Returns 0 on failure to connect.

channel * communicate::client ( const std::string  host,
int  port,
sigc::signal< void, channel * >  handler 
)

Read data from a specified connection.

Returns:
Returns 0 on failure to connect.

bool communicate::reconnect ( channel ch  ) 

Reconnect a client.

Returns:
if connection is a success

void communicate::server ( int  port,
sigc::signal< void, channel * >  handler 
)

Listen to this specific socket for requests.

channel * communicate::tls_client ( const std::string  host,
int  port,
sigc::signal< void, channel * >  handler 
)

Connect to a tls connection.

Returns:
Returns 0 on failure to connect.

void communicate::tls_server ( int  port,
sigc::signal< void, channel * >  handler 
)

Listen with a tls sever for tls clients to connect.

void communicate::tls_reload (  ) 

Read the dhfile and rsafile into the tls structures.

void communicate::poll ( void   ) 

read and write data, including cleanup after closed connections or timeouts

void communicate::complete ( int  timeout  ) 

open communication till the connection is closed or the timeout is reached

void communicate::server_close ( void   ) 

Indicate a shutdown of the server.


Member Data Documentation

std::string communicate::user

user id for connection

std::string communicate::session

Session id.

long communicate::sessnr

Session nr.


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

Generated on Tue Jan 1 17:30:01 2008 for communicate Class Reference by  doxygen   Visit the project page on SourceForge.net Logo