#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.
|
pure virtual |
Close the socket
Implemented in eip::socket::TestSocket, eip::socket::UDPSocket, and eip::socket::TCPSocket.
|
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.
|
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.
|
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.
|
inlinevirtual |