Public Member Functions | Private Attributes | List of all members
eip::socket::TCPSocket Class Reference

#include <tcp_socket.h>

Inheritance diagram for eip::socket::TCPSocket:
Inheritance graph
[legend]

Public Member Functions

virtual void close ()
 
virtual void open (string hostname, string port)
 
virtual size_t receive (mutable_buffer buf)
 
virtual size_t send (const_buffer buf)
 
 TCPSocket (io_service &io_serv)
 
- Public Member Functions inherited from eip::socket::Socket
virtual size_t send (const Serializable &msg)
 
virtual ~Socket ()
 

Private Attributes

tcp::socket socket_
 

Detailed Description

TCP Implementation of the Socket interface

Definition at line 45 of file tcp_socket.h.

Constructor & Destructor Documentation

eip::socket::TCPSocket::TCPSocket ( io_service &  io_serv)
inline

Definition at line 49 of file tcp_socket.h.

Member Function Documentation

virtual void eip::socket::TCPSocket::close ( )
inlinevirtual

Close the socket

Implements eip::socket::Socket.

Definition at line 67 of file tcp_socket.h.

virtual void eip::socket::TCPSocket::open ( string  hostname,
string  port 
)
inlinevirtual

Open the socket to connect to the given hostname and port

Parameters
hostnameHostname to connect to
portName or number of port to connect to

Implements eip::socket::Socket.

Definition at line 56 of file tcp_socket.h.

virtual size_t eip::socket::TCPSocket::receive ( mutable_buffer  buf)
inlinevirtual

Receive bytes from the socket

Parameters
bufBuffer into which to store received data
Returns
number of bytes read

Implements eip::socket::Socket.

Definition at line 87 of file tcp_socket.h.

virtual size_t eip::socket::TCPSocket::send ( const_buffer  buf)
inlinevirtual

Send the contents of the buffer out the socket

Parameters
bufData to send out the socket
Returns
number of bytes written

Implements eip::socket::Socket.

Definition at line 77 of file tcp_socket.h.

Member Data Documentation

tcp::socket eip::socket::TCPSocket::socket_
private

Definition at line 94 of file tcp_socket.h.


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


odva_ethernetip
Author(s): Kareem Shehata
autogenerated on Mon Jun 10 2019 14:00:16