MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / SetSendTimeout

Method SetSendTimeout

examples/ThirdPartyLibs/clsocket/src/SimpleSocket.cpp:626–645  ·  view source on GitHub ↗

------------------------------------------------------------------------------ SetSendTimeout() ------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

624//
625//------------------------------------------------------------------------------
626bool CSimpleSocket::SetSendTimeout(int32 nSendTimeoutSec, int32 nSendTimeoutUsec)
627{
628 bool bRetVal = true;
629
630 memset(&m_stSendTimeout, 0, sizeof(struct timeval));
631 m_stSendTimeout.tv_sec = nSendTimeoutSec;
632 m_stSendTimeout.tv_usec = nSendTimeoutUsec;
633
634 //--------------------------------------------------------------------------
635 // Sanity check to make sure the options are supported!
636 //--------------------------------------------------------------------------
637 if (SETSOCKOPT(m_socket, SOL_SOCKET, SO_SNDTIMEO, &m_stSendTimeout,
638 sizeof(struct timeval)) == CSimpleSocket::SocketError)
639 {
640 bRetVal = false;
641 TranslateSocketError();
642 }
643
644 return bRetVal;
645}
646
647//------------------------------------------------------------------------------
648//

Callers 3

connectTCPMethod · 0.80
connectMethod · 0.80
TCPThreadFuncFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected