freesecs::hsms_socket_t Class Reference

HSMS socket base class Implements tcp cnx link establishment, defines interface for descendant classes. More...

#include <hsms_socket.h>

Inheritance diagram for freesecs::hsms_socket_t:

Inheritance graph
[legend]
Collaboration diagram for freesecs::hsms_socket_t:

Collaboration graph
[legend]
List of all members.

Public Types

enum  cnx_state_et { NOT_CONNECTED, CONNECTING, CONNECTED }
typedef std::vector< unsigned
char > 
data_t
typedef shared_ptr_t< data_tpdata_t

Public Member Functions

 hsms_socket_t (const char *name, const int port)
 Passive cnx socket ctor.
 hsms_socket_t (const char *name, const char *host, int port)
 Active cnx socket ctor.
virtual ~hsms_socket_t ()
int connect ()
 Start tcp connect.
int disconnect ()
 Disconnect tcp link.
int send (pdata_t)
 Send data over tcp.
int receive (pdata_t)
 reveive data from tcp connection
cnx_state_et get_cnx_state () const
 returns tcp connection state

Public Attributes

signal_one_arg_t< cnx_state_etcnx_state_signal
 Connection state change signal.
signal_no_args_t cnx_failed_signal
 Connection establishment failure signal.

Protected Types

enum  sock_cnx_ev_et {
  e_connect, e_connect_failed, e_connected, e_disconnect,
  e_send, e_recv
}
 HSMS socket tcp cnx statemachine event types declaration.

Protected Member Functions

int connect_tcp ()
 TCP connect procedure implementation.
virtual int disconnect_tcp ()
 TCP disconnect procedure implementation.
int send_tcp (pdata_t)
 Data sending over tcp implementation.
virtual int recv_tcp (pdata_t)=0
 Iface to data receiving implementation.
int connect_to ()
 Connects to remote site.
int bind ()
 BSD bind call.
int listen ()
 BSD listen call.
int accept ()
 BSD accept call.
int process (sock_cnx_ev_t)
 HSMS socket tcp cnx statemachine.

Protected Attributes

std::string _name
std::string _cnx_sm_name
std::string _remote_host
int _port
int _sock
sockaddr_in _addr

Classes

struct  sock_cnx_ev_t
 HSMS socket tcp cnx statemachine event declaration. More...

Detailed Description

HSMS socket base class Implements tcp cnx link establishment, defines interface for descendant classes.

Definition at line 45 of file hsms_socket.h.


The documentation for this class was generated from the following files:
Generated on Fri Oct 3 15:30:25 2008 for FREESECS hsms by  doxygen 1.5.1