| 465 | } |
| 466 | |
| 467 | void 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 | |
| 492 | void SendAbort (void) |
| 493 | { |
no test coverage detected