客户端数据读超时配置,客户端停止读取数据,超时时间后断开相应连接,默认是60秒。
If the client stops reading data, free up the stale client connection after this much time. Default 60.
如果在超时之前读线程被唤醒,pthread_cond _ timedwait的返回值是0。
If the reader thread is awakened before the timeout, the return value from pthread_cond_timedwait will be 0.
如果到超时时间段结束时还没有被唤醒,读线程需要唤醒自身并释放互斥锁。
If not awake otherwise, at the end of the timeout, the reader needs to wake itself up and release the mutex.
应用推荐