libs/stream_message/src/transport.cxx
// ===========================================================================
// intialization of sockets
// returns whether initialized OK
//
intialization of sockets
returns whether initialized OK
intialization of sockets returns whether initialized OK
bool nTransport::initialize()
{
#ifdef TRANSPORT_SERVER
    Exclusion s(creation_mutex);
#endif
    if (!transport_initted) {
	transport_initted = true;
#ifdef _WIN32
	WORD    wVersionRequested;  
	WSADATA wsaData; 
	int     err; 
	wVersionRequested = MAKEWORD(2, 2); 
	err               = WSAStartup(wVersionRequested, &wsaData); 
	if (err != 0) {
	    fprintf(stderr, "No sockets available.\n");
	    fflush(stderr);
	    return false;
	}
#endif
    }
    return true;
}
bool nTransport :: initialize ( ) { #ifdef TRANSPORT_SERVER Exclusion s ( creation_mutex ) ; #endif if ( ! transport_initted ) { transport_initted = true ; #ifdef _WIN32 WORD wVersionRequested ; WSADATA wsaData ; int err ; wVersionRequested = MAKEWORD ( 2 , 2 ) ; err = WSAStartup ( wVersionRequested , & wsaData ) ; if ( err != 0 ) { fprintf ( stderr , " \n " ) ; fflush ( stderr ) ; return false ; } #endif } return true ; }
intialization of sockets
returns whether initialized OK
intialization of sockets returns whether initialized OK