summaryrefslogtreecommitdiff
path: root/src/net_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/net_io.c')
-rw-r--r--src/net_io.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/net_io.c b/src/net_io.c
index e4fb5aae..6067134d 100644
--- a/src/net_io.c
+++ b/src/net_io.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: net_io.c 249 2006-01-02 21:02:16Z fraggle $
+// $Id: net_io.c 467 2006-04-09 02:50:34Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -48,6 +48,8 @@ struct _net_context_s
int num_modules;
};
+net_addr_t net_broadcast_addr;
+
net_context_t *NET_NewContext(void)
{
net_context_t *context;
@@ -94,6 +96,16 @@ void NET_SendPacket(net_addr_t *addr, net_packet_t *packet)
addr->module->SendPacket(addr, packet);
}
+void NET_SendBroadcast(net_context_t *context, net_packet_t *packet)
+{
+ int i;
+
+ for (i=0; i<context->num_modules; ++i)
+ {
+ context->modules[i]->SendPacket(&net_broadcast_addr, packet);
+ }
+}
+
boolean NET_RecvPacket(net_context_t *context,
net_addr_t **addr,
net_packet_t **packet)