Definition at line 39 of file sl_udp_channel.cpp.
◆ UdpChannel()
sl::UdpChannel::UdpChannel |
( |
const std::string & |
ip, |
|
|
int |
port |
|
) |
| |
|
inline |
◆ bind()
bool sl::UdpChannel::bind |
( |
const std::string & |
ip, |
|
|
sl_s32 |
port |
|
) |
| |
|
inline |
◆ clearReadCache()
void sl::UdpChannel::clearReadCache |
( |
| ) |
|
|
inlinevirtual |
◆ close()
void sl::UdpChannel::close |
( |
| ) |
|
|
inlinevirtual |
◆ flush()
void sl::UdpChannel::flush |
( |
| ) |
|
|
inlinevirtual |
◆ getChannelType()
int sl::UdpChannel::getChannelType |
( |
| ) |
|
|
inlinevirtual |
◆ open()
bool sl::UdpChannel::open |
( |
| ) |
|
|
inlinevirtual |
◆ read()
int sl::UdpChannel::read |
( |
void * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
inlinevirtual |
Read data from the chanel
- Parameters
-
buffer | The buffer to receive data |
size | The size of the read buffer |
- Returns
- Bytes read (negative for read failure)
Implements sl::IChannel.
Definition at line 98 of file sl_udp_channel.cpp.
◆ setStatus()
void sl::UdpChannel::setStatus |
( |
_u32 |
flag | ) |
|
|
inline |
◆ waitForData()
bool sl::UdpChannel::waitForData |
( |
size_t |
size, |
|
|
sl_u32 |
timeoutInMs, |
|
|
size_t * |
actualReady |
|
) |
| |
|
inlinevirtual |
Wait for some data
- Parameters
-
size | Bytes to wait |
timeoutInMs | Wait timeout (in microseconds, -1 for forever) |
actualReady | [out] actual ready bytes |
- Returns
- true for data ready
Implements sl::IChannel.
Definition at line 85 of file sl_udp_channel.cpp.
◆ waitForDataExt()
sl_result sl::UdpChannel::waitForDataExt |
( |
size_t & |
size_hint, |
|
|
sl_u32 |
timeoutInMs |
|
) |
| |
|
inlinevirtual |
Wait for some data
- Parameters
-
size_hint | Byte count may available to retrieve without beening blocked |
timeoutInMs | Wait timeout (in microseconds, -1 for forever) |
- Returns
- RESULT_OK if there is data available for receiving RESULT_OPERATION_TIMEOUT if the given timeout duration is exceed RESULT_OPERATION_FAIL if there is something wrong with the channel
Implements sl::IChannel.
Definition at line 70 of file sl_udp_channel.cpp.
◆ write()
int sl::UdpChannel::write |
( |
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
|
inlinevirtual |
Send data to remote endpoint
- Parameters
-
data | The data buffer |
size | The size of data buffer (in bytes) |
- Returns
- Bytes written (negative for write failure)
Implements sl::IChannel.
Definition at line 93 of file sl_udp_channel.cpp.
◆ _binded_socket
◆ _ip
std::string sl::UdpChannel::_ip |
|
private |
◆ _port
int sl::UdpChannel::_port |
|
private |
◆ _socket
The documentation for this class was generated from the following file: