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