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

Popular posts from this blog

javascript - Feed FileReader from server side files -

c++ - What's the differece between of link to a dynamic file and as a input object? -

How to pass json object using PHP in Wepay API -