创建Socket优先绑定本线程

This commit is contained in:
xiongziliang
2019-05-31 18:01:38 +08:00
parent f2e4eac5ef
commit c0f41167ba
7 changed files with 11 additions and 11 deletions

View File

@@ -46,7 +46,7 @@ public:
typedef function< bool(int intervaled, const Buffer::Ptr &buffer, struct sockaddr *peer_addr)> onRecvData;
~UDPServer();
static UDPServer &Instance();
Socket::Ptr getSock(const char *strLocalIp, int intervaled,uint16_t iLocalPort = 0);
Socket::Ptr getSock(const EventPoller::Ptr &poller,const char *strLocalIp, int intervaled,uint16_t iLocalPort = 0);
void listenPeer(const char *strPeerIp, void *pSelf, const onRecvData &cb);
void stopListenPeer(const char *strPeerIp, void *pSelf);
private: