Public Member Functions
eip::socket::Socket Class Reference

#include <socket.h>

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

List of all members.

Public Member Functions

virtual void close ()=0
virtual void open (string hostname, string port)=0
virtual size_t receive (mutable_buffer buf)=0
virtual size_t send (const_buffer buf)=0
virtual size_t send (const Serializable &msg)
virtual ~Socket ()

Detailed Description

Generic interface for sockets. Provides the ability to produce testable implementations that don't rely on actual sockets.

Definition at line 52 of file socket.h.


Constructor & Destructor Documentation

virtual eip::socket::Socket::~Socket ( ) [inline, virtual]

Definition at line 56 of file socket.h.


Member Function Documentation

virtual void eip::socket::Socket::close ( ) [pure virtual]
virtual void eip::socket::Socket::open ( string  hostname,
string  port 
) [pure virtual]

Open the socket to connect to the given hostname and port

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

Implemented in eip::socket::TestSocket, eip::socket::UDPSocket, and eip::socket::TCPSocket.

virtual size_t eip::socket::Socket::receive ( mutable_buffer  buf) [pure virtual]

Receive bytes from the socket

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

Implemented in eip::socket::TestSocket, eip::socket::UDPSocket, and eip::socket::TCPSocket.

virtual size_t eip::socket::Socket::send ( const_buffer  buf) [pure virtual]

Send the contents of the buffer out the socket

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

Implemented in eip::socket::TestSocket, eip::socket::UDPSocket, and eip::socket::TCPSocket.

virtual size_t eip::socket::Socket::send ( const Serializable &  msg) [inline, virtual]

Send the serializable message out the socket

Parameters:
msgSerializable message to send
Returns:
number of bytes sent

Definition at line 82 of file socket.h.


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


odva_ethernetip
Author(s): Kareem Shehata
autogenerated on Sat Jun 8 2019 20:21:23