c++ - how to check socket is not receiving for a time period -
in application 2 different sockets receiving , sending periodic data. need close socket if not receive or send particular time period. since using continuously flowing periodic data, not set number of send , receive. please me find out way socket not receiving or sending time period
set read timeout on socket so_rcvtimeo. if expires, recv()
return -1 errno == eagain/ewouldblock
.
Comments
Post a Comment