Commit Graph

11 Commits

Author SHA1 Message Date
Eric Wasylishen 3cae0dae3f net_defs.h: add a preprocessor assertion that NET_MAXMESSAGE is sane
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1391 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-02 00:45:00 +00:00
Ozkan Sezer b9032b7815 copyright years, general tidy-up, remove unused d_ifacea.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1059 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-22 08:55:46 +00:00
Ozkan Sezer e6cf670066 net_win.c, net_sdl.c, net_bsd.c, net_defs.h: removed fixed size from net_drivers
and net_landrivers. changed net_numdrivers and net_numlandrivers into const int
and assigned their values using array size macros instead of hardcoded numbers.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@528 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-18 10:00:36 +00:00
Ozkan Sezer fef3a3d3d6 added IS_LOOP_DRIVER macro and made the confusing loop driver checks
more readable. from uhexen2.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@488 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-09-20 18:05:51 +00:00
Ozkan Sezer 906df3f650 const correctness changes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@300 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 02:22:55 +00:00
Ozkan Sezer d9182f61a4 made the PollProcedure api compatible with C++.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@298 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-24 10:29:19 +00:00
Ozkan Sezer f89750857f struct sockaddr has unsigned char sa_len as the first member in BSD
in BSD variants and the family member is also an unsigned char instead
of (unsigned) short. So we define HAVE_SA_LEN for those BDS variants
and check for the offsetof for the sa_family member and also change
the struct qsockaddr to mirror that.  This should matter only when
PLATFORM_UNIX is defined.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@260 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-09 12:20:39 +00:00
Ozkan Sezer 01d0107869 net_udp, net_wins, net_wipx network drivers update:
- do not try to set the quake hostname to the machine name if it isn't set.
- use the newly added unix/windows socket api compatibility macros from
net_sys.h: using just an int as the socketfd wasn't a problem without win64
support: the windows SOCKET type is not only unsigned but may actually be
wider (uintptr_t, which is 8 bytes on win64).


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@220 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 15:24:40 +00:00
Ozkan Sezer 269be1c938 net_defs.h (net_driver_t): Removed the controlSock member. It is not used
for any purpose in either of Loop, Datagram or Serial drivers. It used to
be assigned the value returned by the Init() procedure of the relevant
driver which is either 0 for success or -1 for failure, therefore there is
no purpose to it at all.
net_main.c (NET_Init): Removed the controlSocket var and adjusted for the
net_driver_t change.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@213 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 10:50:21 +00:00
Ozkan Sezer ca7aa6c733 * net_defs.h, net_udp.c, net_wins.c, net_wipx.c, net_sdlnet.c: prefixed
the members of qsockaddr structure with a "q".


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@207 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-21 09:20:32 +00:00
Ozkan Sezer febb164f0f * net.h: separated the functions and data exported through net.h into two:
net.h now holds all public exports and the new net_defs.h holds the exports
only required by the net layer. besides the net_* files, host_cmd.c and
sv_main.c are the only reasonable foreign importers of net_defs.h: they
require accessing the qsocket_s structure members. The only one that does
not fit is menu.c needing some net exports, but it may be properly handled,
later on.
* net_defs.h: New header.
* host_cmd.c: Include net_defs.h.
* menu.c: Likewise.
* net_bsd.c: Likewise.
* net_dgrm.c: Likewise.
* net_loop.c: Likewise.
* net_main.c: Likewise.
* net_sdl.c: Likewise.
* net_sdlnet.c: Likewise.
* net_udp.c: Likewise.
* net_win.c: Likewise.
* net_wins.c: Likewise.
* net_wipx.c: Likewise.
* sv_main.c: Likewise.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@204 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-20 17:21:10 +00:00