Class Socket
Defined in File Socket.h
Inheritance Relationships
Derived Type
public ska::pst::recv::UDPSocket
(Class UDPSocket)
Class Documentation
-
class Socket
Abstract base class for a UDP, TCP or IBV Socket.
Subclassed by ska::pst::recv::UDPSocket
Public Functions
-
virtual void open(int port) = 0
Opens the socket on the specified port and set the file descriptor.
- Parameters
port –
-
void close_me()
Close the socket file descriptor.
-
virtual void resize(size_t new_bufsz)
Resize the socket buffer to the specified size.
- Parameters
new_bufsz – new socket size in bytes
-
void reset_buffer()
Set the socket buffer to zero.
-
int set_nonblock()
Configure the socket as non blocking.
- Returns
int
-
int set_block()
Configure the socket as blocking.
- Returns
int
-
inline char get_blocking()
Get the blocking object.
- Returns
char
-
inline int get_fd()
Return the socket file descriptor.
- Returns
int internal file descriptor
-
inline char *get_buf()
Return a pointer to the socket buffer.
- Returns
char*
-
inline size_t get_bufsz()
Return the size of the socket buffer.
- Returns
size_t socket buffer size in bytes.
-
virtual void open(int port) = 0