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

Method TUDP

sourcecommon/udp.cpp:7–29  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

5
6//---------------------------------------------------------------------------
7TUDP::TUDP(bool enableExceptions, bool _bBlockProtected)
8 : handle( NULL ),
9 Connected( false ),
10 Error( 0 ),
11 WSAError( 0 ),
12 Exceptions( enableExceptions ),
13 bBlockProtected( _bBlockProtected )
14{
15 InBytes = OutBytes = bytes = FlushSize = 0;
16 memset(&destAddr, 0, sizeof(destAddr));
17 destAddr.sin_family = AF_INET;
18 memset(&localAddr, 0, sizeof(localAddr));
19 localAddr.sin_family = AF_INET;
20
21 WSADATA WsaData;
22 WORD wVersionRequested = MAKEWORD(2, 0);
23 WSAError = WSAStartup(wVersionRequested, &WsaData);
24 if( WSAError )
25 {
26 Error = 1;
27 if( Exceptions ) throw 0;
28 }
29}
30//---------------------------------------------------------------------------
31TUDP::TUDP(char * dest, WORD port, bool enableExceptions, bool _bBlockProtected)
32 : handle( NULL ),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected