mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 22:11:22 +00:00
net_bsd.c, net_dgrm.h, net_loop.c, net_loop.h, net_sdl.c, net_win.c: more trivialities.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@217 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
dd05f2d23b
commit
2bed6c79c9
6 changed files with 190 additions and 189 deletions
|
@ -23,8 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "quakedef.h"
|
||||
#include "net_defs.h"
|
||||
|
||||
#include "net_loop.h"
|
||||
#include "net_dgrm.h"
|
||||
#include "net_loop.h"
|
||||
|
||||
net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
||||
{
|
||||
|
@ -43,8 +43,8 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
|||
Loop_CanSendUnreliableMessage,
|
||||
Loop_Close,
|
||||
Loop_Shutdown
|
||||
}
|
||||
,
|
||||
},
|
||||
|
||||
{
|
||||
"Datagram",
|
||||
false,
|
||||
|
|
|
@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
// net_dgrm.h
|
||||
|
||||
|
||||
int Datagram_Init (void);
|
||||
void Datagram_Listen (qboolean state);
|
||||
void Datagram_SearchForHosts (qboolean xmit);
|
||||
|
|
|
@ -18,6 +18,7 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
// net_loop.c
|
||||
|
||||
#include "arch_def.h"
|
||||
|
@ -26,9 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "net_defs.h"
|
||||
#include "net_loop.h"
|
||||
|
||||
qboolean localconnectpending = false;
|
||||
qsocket_t *loop_client = NULL;
|
||||
qsocket_t *loop_server = NULL;
|
||||
static qboolean localconnectpending = false;
|
||||
static qsocket_t *loop_client = NULL;
|
||||
static qsocket_t *loop_server = NULL;
|
||||
|
||||
int Loop_Init (void)
|
||||
{
|
||||
|
@ -166,7 +167,7 @@ int Loop_SendMessage (qsocket_t *sock, sizebuf_t *data)
|
|||
bufferLength = &((qsocket_t *)sock->driverdata)->receiveMessageLength;
|
||||
|
||||
if ((*bufferLength + data->cursize + 4) > NET_MAXMESSAGE)
|
||||
Sys_Error("Loop_SendMessage: overflow\n");
|
||||
Sys_Error("Loop_SendMessage: overflow");
|
||||
|
||||
buffer = ((qsocket_t *)sock->driverdata)->receiveMessage + *bufferLength;
|
||||
|
||||
|
@ -247,3 +248,4 @@ void Loop_Close (qsocket_t *sock)
|
|||
else
|
||||
loop_server = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,9 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "quakedef.h"
|
||||
#include "net_defs.h"
|
||||
|
||||
#include "net_loop.h"
|
||||
#include "net_dgrm.h"
|
||||
#include "net_sdlnet.h"
|
||||
#include "net_loop.h"
|
||||
|
||||
net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
||||
{
|
||||
|
@ -46,8 +45,8 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
|||
Loop_CanSendUnreliableMessage,
|
||||
Loop_Close,
|
||||
Loop_Shutdown
|
||||
}
|
||||
,
|
||||
},
|
||||
|
||||
{
|
||||
"Datagram",
|
||||
false,
|
||||
|
@ -68,6 +67,7 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
|||
|
||||
int net_numdrivers = 2;
|
||||
|
||||
#include "net_sdlnet.h"
|
||||
|
||||
net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
|
||||
{
|
||||
|
|
|
@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "quakedef.h"
|
||||
#include "net_defs.h"
|
||||
|
||||
#include "net_loop.h"
|
||||
#include "net_dgrm.h"
|
||||
#include "net_loop.h"
|
||||
|
||||
net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
||||
{
|
||||
|
@ -44,8 +44,8 @@ net_driver_t net_drivers[MAX_NET_DRIVERS] =
|
|||
Loop_CanSendUnreliableMessage,
|
||||
Loop_Close,
|
||||
Loop_Shutdown
|
||||
}
|
||||
,
|
||||
},
|
||||
|
||||
{
|
||||
"Datagram",
|
||||
false,
|
||||
|
@ -95,6 +95,7 @@ net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
|
|||
WINS_GetSocketPort,
|
||||
WINS_SetSocketPort
|
||||
},
|
||||
|
||||
{
|
||||
"Winsock IPX",
|
||||
false,
|
||||
|
@ -118,7 +119,6 @@ net_landriver_t net_landrivers[MAX_NET_DRIVERS] =
|
|||
WIPX_GetSocketPort,
|
||||
WIPX_SetSocketPort
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
int net_numlandrivers = 2;
|
||||
|
|
Loading…
Reference in a new issue