#include <socket.h>

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 () |
Generic interface for sockets. Provides the ability to produce testable implementations that don't rely on actual sockets.
| virtual eip::socket::Socket::~Socket | ( | ) | [inline, virtual] |
| virtual void eip::socket::Socket::close | ( | ) | [pure virtual] |
Close the socket
Implemented in eip::socket::TestSocket, eip::socket::UDPSocket, and eip::socket::TCPSocket.
| virtual void eip::socket::Socket::open | ( | string | hostname, |
| string | port | ||
| ) | [pure virtual] |
Open the socket to connect to the given hostname and port
| hostname | Hostname to connect to |
| port | Name 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
| buf | Buffer into which to store received data |
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
| buf | Data to send out the socket |
Implemented in eip::socket::TestSocket, eip::socket::UDPSocket, and eip::socket::TCPSocket.
| virtual size_t eip::socket::Socket::send | ( | const Serializable & | msg | ) | [inline, virtual] |