RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
UDPSocket类 参考
+ 类 UDPSocket 继承关系图:
+ UDPSocket 的协作图:

Public 成员函数

void Close ()
 
 UDPSocket (bool useConnect=false, FDR_ON_ERROR, int socketId=-1)
 
void StartRecvThread ()
 
int SendTo (const char *bytes, size_t byteslength, const char *host, uint16_t port, FDR_ON_ERROR)
 
int SendTo (const char *bytes, size_t byteslength, const std::string &host, uint16_t port, FDR_ON_ERROR)
 
int SendTo (const std::string &message, const char *host, uint16_t port, FDR_ON_ERROR)
 
int SendTo (const std::string &message, const std::string &host, uint16_t port, FDR_ON_ERROR)
 
int Send (const char *bytes, size_t byteslength)
 
int Send (const std::string &message)
 
void Connect (uint32_t ipv4, uint16_t port, FDR_ON_ERROR)
 
void Connect (const char *host, uint16_t port, FDR_ON_ERROR)
 
void Connect (const std::string &host, uint16_t port, FDR_ON_ERROR)
 
- Public 成员函数 继承自 BaseSocket
std::string remoteAddress () const
 
int remotePort () const
 
int fileDescriptor () const
 

Public 属性

std::function< void(std::string, std::string, uint16_t)> onMessageReceived
 
std::function< void(const char *, size_t, std::string, uint16_t)> onRawMessageReceived
 
bool isUseConnect = false
 
- Public 属性 继承自 BaseSocket
sockaddr_in address
 

额外继承的成员函数

- Public 类型 继承自 BaseSocket
enum  SocketType { TCP = SOCK_STREAM , UDP = SOCK_DGRAM }
 
- Protected 成员函数 继承自 BaseSocket
 BaseSocket (FDR_ON_ERROR, SocketType sockType=TCP, int socketId=-1)
 
- 静态 Protected 成员函数 继承自 BaseSocket
static std::string ipToString (const sockaddr_in &addr)
 
- Protected 属性 继承自 BaseSocket
int sock = 0
 
bool hasSetNoblock =false
 

该类的文档由以下文件生成: