Public Member Functions | Protected Member Functions | Protected Attributes
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

Constructor.

Definition at line 47 of file tcp_server.cpp.

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.

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

Parameters:
port_numport 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.

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:


simple_message
Author(s): Shaun Edwards
autogenerated on Fri Jan 3 2014 11:26:56