コード例 #1
0
ファイル: net_wins.c プロジェクト: Slipyx/r1q2
/*
====================
NET_Init
====================
*/
void NET_Init (void)
{
//	WORD	wVersionRequested; 
	int		r;

//	wVersionRequested = MAKEWORD(1, 1);
	

	r = WSAStartup (MAKEWORD(1, 1), &winsockdata);

	if (r)
		Com_Error (ERR_FATAL,"Winsock initialization failed.");

	NET_Common_Init ();

	net_rcvbuf = Cvar_Get ("net_rcvbuf", "0", 0);
	net_sndbuf = Cvar_Get ("net_sndbuf", "0", 0);

	//r1: needed for pyroadmin hooks
#ifndef NO_SERVER
	if (dedicated->intvalue)
		NET_Config (NET_SERVER);
#endif

	Com_Printf("Winsock Initialized\n", LOG_NET);




	//noudp = Cvar_Get ("noudp", "0", CVAR_NOSET);
	//noipx = Cvar_Get ("noipx", "0", CVAR_NOSET);

	//net_shownet = Cvar_Get ("net_shownet", "0", 0);
}
コード例 #2
0
ファイル: net_afl.cpp プロジェクト: turol/webquake2
void NET_Init (void)
{
	Cvar_SetValue("nostdin", 1.0f);

	NET_Common_Init ();

	cvar_t *afl_fuzz_file = Cvar_Get("afl_fuzz_file", NULL, 0);
	if (!afl_fuzz_file) {
		Com_Printf("afl_fuzz_file not set\n", LOG_NET);
		// so we stop uselessly running the fuzzer
		__builtin_trap();
	}
	fuzzFileName = afl_fuzz_file->string;

	cvar_t *afl_fuzz_out_file = Cvar_Get("afl_fuzz_out_file", NULL, 0);
	if (afl_fuzz_out_file) {
		fuzzOut = fopen(afl_fuzz_out_file->string, "wb");
		if (!fuzzOut) {
			Com_Printf("Failed to open afl_fuzz_out_file \"%s\" %d \"%s\" \n", LOG_NET, afl_fuzz_out_file->string, errno, strerror(errno));
			// so we stop uselessly running the fuzzer
			__builtin_trap();
		}
	}
}
コード例 #3
0
ファイル: net_udp.c プロジェクト: turol/webquake2
/*
====================
NET_Init
====================
*/
void NET_Init (void)
{
	NET_Common_Init ();
	net_no_recverr = Cvar_Get ("net_no_recverr", "0", 0);
}