MCPcopy Create free account
hub / github.com/ZDoom/Raze / StartNetwork

Function StartNetwork

source/common/engine/i_net.cpp:467–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467void StartNetwork (bool autoPort)
468{
469 u_long trueval = 1;
470#ifdef __WIN32__
471 WSADATA wsad;
472
473 if (WSAStartup (0x0101, &wsad))
474 {
475 I_FatalError ("Could not initialize Windows Sockets");
476 }
477#endif
478
479 netgame = true;
480 multiplayer = true;
481
482 // create communication socket
483 mysocket = UDPsocket ();
484 BindToLocalPort (mysocket, autoPort ? 0 : DOOMPORT);
485#ifndef __sun
486 ioctlsocket (mysocket, FIONBIO, &trueval);
487#else
488 fcntl(mysocket, F_SETFL, trueval | O_NONBLOCK);
489#endif
490}
491
492void SendAbort (void)
493{

Callers 2

HostGameFunction · 0.85
JoinGameFunction · 0.85

Calls 3

I_FatalErrorFunction · 0.85
UDPsocketFunction · 0.85
BindToLocalPortFunction · 0.85

Tested by

no test coverage detected