|
void | Bind (const char *addressin, uint16_t port, FDR_ON_ERROR) |
|
void | Bind (uint16_t port, FDR_ON_ERROR) |
|
void | setMulticast (const char *GROUP_IP, FDR_ON_ERROR) |
|
void | setBroadcast (bool value, FDR_ON_ERROR) |
|
int | RecvNoblock (char *buf, std::string &ip, int &port, int maxrecvlen=BUFFER_SIZE_RFLY) |
|
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) |
|
std::string | remoteAddress () const |
|
int | remotePort () const |
|
int | fileDescriptor () const |
|
|
enum | SocketType { TCP = SOCK_STREAM
, UDP = SOCK_DGRAM
} |
|
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 |
|
sockaddr_in | address |
|
| BaseSocket (FDR_ON_ERROR, SocketType sockType=TCP, int socketId=-1) |
|
static std::string | ipToString (const sockaddr_in &addr) |
|
int | sock = 0 |
|
bool | hasSetNoblock =false |
|