Updated RX buffer code
This commit is contained in:
parent
5e30eabd30
commit
f52a82d9f2
3 changed files with 63 additions and 29 deletions
|
@ -974,6 +974,11 @@ public:
|
|||
case ZT_PHY_SOCKET_UNIX_IN: {
|
||||
#ifdef __UNIX_LIKE__
|
||||
ZT_PHY_SOCKFD_TYPE sock = s->sock; // if closed, s->sock becomes invalid as s is no longer dereferencable
|
||||
if ((FD_ISSET(sock,&wfds))&&(FD_ISSET(sock,&_writefds))) {
|
||||
try {
|
||||
_handler->phyOnUnixWritable((PhySocket *)&(*s),&(s->uptr));
|
||||
} catch ( ... ) {}
|
||||
}
|
||||
if (FD_ISSET(sock,&rfds)) {
|
||||
long n = (long)::read(sock,buf,sizeof(buf));
|
||||
if (n <= 0) {
|
||||
|
@ -984,11 +989,6 @@ public:
|
|||
} catch ( ... ) {}
|
||||
}
|
||||
}
|
||||
if ((FD_ISSET(sock,&wfds))&&(FD_ISSET(sock,&_writefds))) {
|
||||
try {
|
||||
//_handler->phyOnUnixWritable((PhySocket *)&(*s),&(s->uptr));
|
||||
} catch ( ... ) {}
|
||||
}
|
||||
#endif // __UNIX_LIKE__
|
||||
} break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue