Return Type | Function name | Arguments |
---|---|---|
hzEcode | hzTcpClient::SetRecvTimeout | (unsigned int,) |
Declared in file: hzTcpClient.h
Defined in file : hzTcpClient.cpp
Function Logic:
Function body:
hzEcode hzTcpClient::SetRecvTimeout (unsigned int nInterval) { struct timeval tv ; tv.tv_sec = nInterval > 0? nInterval : 30; tv.tv_usec = 0; if (setsockopt(m_nSock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) < 0) return E_HOSTFAIL ; return E_OK ; }