|
|
| TCPSocket (int sd) |
| |
| ola::io::DescriptorHandle | ReadDescriptor () const |
| | Returns the read descriptor for this socket.
|
| |
| ola::io::DescriptorHandle | WriteDescriptor () const |
| | Returns the write descriptor for this socket.
|
| |
| bool | Close () |
| |
|
GenericSocketAddress | GetLocalAddress () const |
| |
| GenericSocketAddress | GetPeerAddress () const |
| |
|
bool | SetNoDelay () |
| |
| virtual ssize_t | Send (const uint8_t *buffer, unsigned int size) |
| | Write a buffer to the descriptor.
|
| |
| virtual ssize_t | Send (IOQueue *data) |
| | Write data from an IOQueue to a descriptor.
|
| |
| virtual int | Receive (uint8_t *buffer, unsigned int size, unsigned int &data_read) |
| | Read data from this descriptor.
|
| |
| virtual bool | SetReadNonBlocking () |
| | Enable on non-blocking reads..
|
| |
| int | DataRemaining () const |
| | Find out how much data is left to read.
|
| |
|
bool | IsClosed () const |
| | Check if the descriptor is closed.
|
| |
| void | SetOnClose (OnCloseCallback *on_close) |
| | Set the callback to be run when the descriptor is closed.
|
| |
| OnCloseCallback * | TransferOnClose () |
| | Take ownership of the on_close callback.
|
| |
| void | SetOnData (ola::Callback0< void > *on_read) |
| | Set the callback to be run when data is available for reading.
|
| |
| void | SetOnWritable (ola::Callback0< void > *on_write) |
| | Set the callback to be run when the descriptor can be written to.
|
| |
| void | PerformRead () |
| | Called when there is data available on the descriptor.
|
| |
| void | PerformWrite () |
| | Called when the descriptor can be written to.
|
| |
| bool | ValidReadDescriptor () const |
| | Check if this file descriptor is valid.
|
| |
| bool | ValidWriteDescriptor () const |
| | Check if this file descriptor is valid.
|
| |
|
|
static TCPSocket * | Connect (const SocketAddress &endpoint) |
| |
|
static bool | SetNonBlocking (DescriptorHandle fd) |
| | Set a DescriptorHandle to non-blocking mode.
|
| |
|
| bool | IsSocket () const |
| |
|
bool | SetNoSigPipe (DescriptorHandle fd) |
| | Disable SIGPIPE for this descriptor.
|
| |
◆ Close()
| bool ola::network::TCPSocket::Close |
( |
| ) |
|
|
virtual |
◆ GetPeerAddress()
Get the remote IPAddress and port for this socket
◆ IsSocket()
| bool ola::network::TCPSocket::IsSocket |
( |
| ) |
const |
|
inlineprotectedvirtual |
◆ ReadDescriptor()
| ola::io::DescriptorHandle ola::network::TCPSocket::ReadDescriptor |
( |
| ) |
const |
|
inlinevirtual |
◆ WriteDescriptor()
| ola::io::DescriptorHandle ola::network::TCPSocket::WriteDescriptor |
( |
| ) |
const |
|
inlinevirtual |
The documentation for this class was generated from the following files:
- include/ola/network/TCPSocket.h
- common/network/TCPSocket.cpp