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

Method EnableBroadcast

sourcecommon/udp.cpp:278–298  ·  view source on GitHub ↗

--------------------------------------------------------------------------- ��������� ����������������� ������

Source from the content-addressed store, hash-verified

276//---------------------------------------------------------------------------
277// ��������� ����������������� ������
278bool __fastcall TUDP::EnableBroadcast(BOOL enable)
279{
280 WSAError = 0;
281 Error = 0;
282
283 if( !handle )
284 {
285 WSAError = MYERROR_UNKNOWNPARAMS;
286 Error = 1;
287 if( Exceptions ) throw 0;
288 return false;
289 }
290 if( setsockopt(handle, SOL_SOCKET, SO_BROADCAST, (char *)&enable, sizeof(BOOL))==SOCKET_ERROR )
291 {
292 WSAError = WSAGetLastError();
293 Error = 2;
294 if( Exceptions ) throw 0;
295 return false;
296 }
297 return true;
298}
299//---------------------------------------------------------------------------
300bool TUDP::Write(void * data, int size)
301{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected