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 49 of file tcp_server.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 44 of file tcp_server.cpp.

Destructor.

Definition at line 51 of file tcp_server.cpp.


Member Function Documentation

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

Definition at line 84 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 57 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 118 of file tcp_server.cpp.

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

Definition at line 89 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 82 of file tcp_server.h.


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


simple_message
Author(s): Shaun Edwards
autogenerated on Sat Jun 8 2019 20:43:24