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

Method ReadLength

sourcecommon/udp.cpp:475–498  ·  view source on GitHub ↗

--------------------------------------------------------------------------- C�������� ������ ���� ������� � �������� ������

Source from the content-addressed store, hash-verified

473//---------------------------------------------------------------------------
474// C�������� ������ ���� ������� � �������� ������
475DWORD TUDP::ReadLength(void)
476{
477 WSAError = 0;
478 Error = 0;
479
480 if( !handle )
481 {
482 WSAError = MYERROR_UNKNOWNPARAMS;
483 Error = 1;
484 if( Exceptions ) throw 0;
485 return !Error;
486 }
487
488 DWORD bufsize;
489 if( ioctlsocket(handle, FIONREAD, &bufsize) == SOCKET_ERROR )
490 {
491 WSAError = WSAGetLastError();
492 Error = 1;
493 bufsize = 0;
494 if( Exceptions ) throw 0;
495 return !Error;
496 }
497 return bufsize;
498}
499//---------------------------------------------------------------------------
500bool TUDP::Poll(bool bread, bool bwrite, bool berror, long msec)
501{

Callers 2

UdpReceiveMessageFunction · 0.45
TcpReceiveMessageFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected