MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / ReadLength

Method ReadLength

sourcecommon/tcpserv.cpp:94–105  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

92}
93//---------------------------------------------------------------------------
94DWORD MSocket::ReadLength(void)
95{
96 if( !handle ) { Error = true; if( Exceptions ) throw 0; return !Error; }
97 //
98 DWORD bytes;
99 Error = ioctlsocket(handle, FIONREAD, &bytes);
100 errcode = 0;
101 if( Error==SOCKET_ERROR ) errcode = WSAGetLastError();
102 //
103 if( Error ) { bytes = 0L; if( Exceptions ) throw 0; }
104 return bytes;
105}
106//---------------------------------------------------------------------------
107bool MSocket::Poll(bool bread, bool bwrite, bool berror, long msec)
108{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected