UDP socket implementation.
This commit is contained in:
parent
8adbbe092d
commit
1a0a6755b1
4 changed files with 127 additions and 7 deletions
|
@ -434,10 +434,20 @@ void SocketManager::poll(unsigned long timeout)
|
|||
}
|
||||
}
|
||||
for(std::vector< SharedPtr<Socket> >::iterator s(ts.begin());s!=ts.end();++s) {
|
||||
if (FD_ISSET((*s)->_sock,&rfds))
|
||||
(*s)->notifyAvailableForRead(*s,this);
|
||||
if (FD_ISSET((*s)->_sock,&wfds))
|
||||
(*s)->notifyAvailableForWrite(*s,this);
|
||||
if (FD_ISSET((*s)->_sock,&wfds)) {
|
||||
if (!(*s)->notifyAvailableForWrite(*s,this)) {
|
||||
Mutex::Lock _l2(_tcpSockets_m);
|
||||
_tcpSockets.erase(((TcpSocket *)s->ptr())->_remote);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (FD_ISSET((*s)->_sock,&rfds)) {
|
||||
if (!(*s)->notifyAvailableForRead(*s,this)) {
|
||||
Mutex::Lock _l2(_tcpSockets_m);
|
||||
_tcpSockets.erase(((TcpSocket *)s->ptr())->_remote);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue