|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Abstract base for network socket operations. More...
#include <NetworkSocket.hpp>
Public Member Functions | |
| virtual | ~NetworkSocket ()=default |
| virtual ssize_t | receive (uint8_t *buffer, size_t max_size)=0 |
| Receive data from the socket. | |
| virtual ssize_t | send (const uint8_t *data, size_t size)=0 |
| Send data through the socket. | |
| virtual bool | is_valid () const =0 |
| Check if socket is valid and ready. | |
| virtual std::string | last_error () const =0 |
| Get the last error message. | |
Abstract base for network socket operations.
Provides a clean interface for UDP/TCP socket operations without exposing platform-specific details.
Definition at line 16 of file NetworkSocket.hpp.
|
virtualdefault |
|
pure virtual |
Check if socket is valid and ready.
Implemented in daq_comms::transport::TCPSocket, and daq_comms::transport::UDPSocket.
|
pure virtual |
Get the last error message.
Implemented in daq_comms::transport::TCPSocket, and daq_comms::transport::UDPSocket.
|
pure virtual |
Receive data from the socket.
| buffer | Buffer to store received data |
| max_size | Maximum bytes to receive |
Implemented in daq_comms::transport::TCPSocket, and daq_comms::transport::UDPSocket.
|
pure virtual |
Send data through the socket.
| data | Data to send |
| size | Number of bytes to send |
Implemented in daq_comms::transport::TCPSocket, and daq_comms::transport::UDPSocket.