$search

industrial::tcp_server::TcpServer Class Reference

Defines TCP server functions. More...

#include <tcp_server.h>

Inheritance diagram for industrial::tcp_server::TcpServer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool init (int port_num)
 initializes TCP server socket. The connect method must be called following initialization in order to communicate with the remote host.
bool makeConnect ()
 connects to the remote host
 TcpServer ()
 Constructor.
 ~TcpServer ()
 Destructor.

Protected Member Functions

int getSrvrHandle () const
void setSrvrHandle (int srvr_handle_)

Protected Attributes

int srvr_handle_
 server handle. Every time a connection is made, the class generates a new handle for sending/receiving. The server handle is saved off to a separate variable so that recoving a lost connection is possible.

Detailed Description

Defines TCP server functions.

Definition at line 51 of file tcp_server.h.


Constructor & Destructor Documentation

industrial::tcp_server::TcpServer::TcpServer (  ) 

Constructor.

Definition at line 47 of file tcp_server.cpp.

industrial::tcp_server::TcpServer::~TcpServer (  ) 

Destructor.

Definition at line 54 of file tcp_server.cpp.


Member Function Documentation

int industrial::tcp_server::TcpServer::getSrvrHandle (  )  const [inline, protected]

Definition at line 86 of file tcp_server.h.

bool industrial::tcp_server::TcpServer::init ( int  port_num  ) 

initializes TCP server socket. The connect method must be called following initialization in order to communicate with the remote host.

Parameters:
port_num port number (server & client port number must match)
Returns:
true on success, false otherwise (socket is invalid)

Definition at line 60 of file tcp_server.cpp.

bool industrial::tcp_server::TcpServer::makeConnect (  )  [virtual]

connects to the remote host

Returns:
true on success, false otherwise

Implements industrial::smpl_msg_connection::SmplMsgConnection.

Definition at line 121 of file tcp_server.cpp.

void industrial::tcp_server::TcpServer::setSrvrHandle ( int  srvr_handle_  )  [inline, protected]

Definition at line 91 of file tcp_server.h.


Member Data Documentation

server handle. Every time a connection is made, the class generates a new handle for sending/receiving. The server handle is saved off to a separate variable so that recoving a lost connection is possible.

Definition at line 84 of file tcp_server.h.


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


simple_message
Author(s): Shaun Edwards
autogenerated on Mon Mar 4 11:36:30 2013