source/Socket.cpp
xiSocket::xiSocket() {
	nativeHandle = 0; // This is a null socket, it shouldn't do anything

#if defined( __WIN_API__ )
	if ( winsockReferenceCount++ == 0 ) {
		const int winSockError = WSAStartup( MAKEWORD( 2, 2 ), &winSockData ); // Start winsock
		if ( winSockError ) {
			if ( --winsockReferenceCount == 0 ) {
				WSACleanup(); // Destroy winsock
			}

			status = STATUS_ERROR;
		}
	}
#endif
}
/*
====================
xiSocket::xiSocket

	Constructor
	If winsock is in use, the Winsock system is started up here
====================
*/
:xiSocket
Constructor
If winsock is in use, the Winsock system is started up here
: xiSocket Constructor If winsock is in use the Winsock system is started up here
xiSocket::xiSocket() {
	nativeHandle = 0; 
#if defined( __WIN_API__ )
	if ( winsockReferenceCount++ == 0 ) {
		const int winSockError = WSAStartup( MAKEWORD( 2, 2 ), &winSockData ); 
		if ( winSockError ) {
			if ( --winsockReferenceCount == 0 ) {
				WSACleanup(); 
			}
			status = STATUS_ERROR;
		}
	}
#endif
}
xiSocket :: xiSocket ( ) { nativeHandle = 0 ; #if defined ( __WIN_API__ ) if ( winsockReferenceCount ++ == 0 ) { const int winSockError = WSAStartup ( MAKEWORD ( 2 , 2 ) , & winSockData ) ; if ( winSockError ) { if ( -- winsockReferenceCount == 0 ) { WSACleanup ( ) ; } status = STATUS_ERROR ; } } #endif }
xiSocket::xiSocket
Constructor
If winsock is in use, the Winsock system is started up here
xiSocket :: xiSocket Constructor If winsock is in use the Winsock system is started up here
// This is a null socket, it shouldn't do anything // Start winsock // Destroy winsock