summaryrefslogtreecommitdiff
path: root/src/net_server.c
diff options
context:
space:
mode:
authorSimon Howard2006-03-30 00:23:20 +0000
committerSimon Howard2006-03-30 00:23:20 +0000
commitcd2a2a8d21ebcd5192f7c79793cf4c99790f6f11 (patch)
tree55002dbd11326dc2118197545eed51be26a45855 /src/net_server.c
parent68ea842e257864919bf166a360a4a1a6bb65805a (diff)
downloadchocolate-doom-cd2a2a8d21ebcd5192f7c79793cf4c99790f6f11.tar.gz
chocolate-doom-cd2a2a8d21ebcd5192f7c79793cf4c99790f6f11.tar.bz2
chocolate-doom-cd2a2a8d21ebcd5192f7c79793cf4c99790f6f11.zip
Remove hard-coded use of network modules from server code.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 453
Diffstat (limited to 'src/net_server.c')
-rw-r--r--src/net_server.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/net_server.c b/src/net_server.c
index d8e73453..d49934e5 100644
--- a/src/net_server.c
+++ b/src/net_server.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: net_server.c 440 2006-03-24 21:43:43Z fraggle $
+// $Id: net_server.c 453 2006-03-30 00:23:20Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -1282,19 +1282,23 @@ static void NET_SV_RunClient(net_client_t *client)
}
}
+// Add a network module to the server context
+
+void NET_SV_AddModule(net_module_t *module)
+{
+ NET_AddModule(server_context, module);
+ module->InitServer();
+}
+
// Initialise server and wait for connections
void NET_SV_Init(void)
{
int i;
- // initialise send/receive context, with loopback send/recv
+ // initialise send/receive context
server_context = NET_NewContext();
- NET_AddModule(server_context, &net_loop_server_module);
- net_loop_server_module.InitServer();
- NET_AddModule(server_context, &net_sdl_module);
- net_sdl_module.InitServer();
// no clients yet