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

Method Close

sourcecommon/tcpserv.cpp:36–50  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

34}
35//---------------------------------------------------------------------------
36bool MSocket::Close(void)
37{
38 if( !handle || !Connected ) return true;
39/*
40 * WinSock 2 extension -- manifest constants for shutdown()
41 #define SD_RECEIVE 0x00
42 #define SD_SEND 0x01
43 #define SD_BOTH 0x02
44*/
45 shutdown(handle, 0x02); // SD_SEND
46 Error = closesocket(handle);
47 handle = NULL;
48 Connected = false;
49 return ! Error;
50}
51//---------------------------------------------------------------------------
52bool MSocket::Write(void * data, int size)
53{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected