]> icculus.org git repositories - taylor/freespace2.git/blob - include/multilag.h
added copyright header
[taylor/freespace2.git] / include / multilag.h
1 /*
2  * Copyright (C) Volition, Inc. 1999.  All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell 
5  * or otherwise commercially exploit the source or things you created based on
6  * the source.
7  */
8
9 /*
10  * $Logfile: /Freespace2/code/Network/multilag.h $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * $Log$
16  * Revision 1.2  2002/06/09 04:41:14  relnev
17  * added copyright header
18  *
19  * Revision 1.1.1.1  2002/05/03 03:28:12  root
20  * Initial import.
21  *
22  * 
23  * 5     6/07/99 9:51p Dave
24  * Consolidated all multiplayer ports into one.
25  * 
26  * 4     11/19/98 8:03a Dave
27  * Full support for D3-style reliable sockets. Revamped packet lag/loss
28  * system, made it receiver side and at the lowest possible level.
29  * 
30  * 3     11/05/98 5:55p Dave
31  * Big pass at reducing #includes
32  * 
33  * 2     10/07/98 10:53a Dave
34  * Initial checkin.
35  * 
36  * 1     10/07/98 10:50a Dave
37  * 
38  * 12    4/27/98 6:02p Dave
39  * Modify how missile scoring works. Fixed a team select ui bug. Speed up
40  * multi_lag system. Put in new main hall.
41  * 
42  * 11    4/04/98 8:42p Dave
43  * Tested and debugged UDP reliable socket layer. Modified lag system to
44  * take this into account. 
45  * 
46  * 10    4/01/98 11:19p Dave
47  * Put in auto-loading of xferred pilot pic files. Grey out background
48  * behind pinfo popup. Put a chatbox message in when players are kicked.
49  * Moved mission title down in briefing. Other ui fixes.
50  * 
51  * 9     3/14/98 2:48p Dave
52  * Cleaned up observer joining code. Put in support for file xfers to
53  * ingame joiners (observers or not). Revamped and reinstalled pseudo
54  * lag/loss system.
55  * 
56  * 8     1/15/98 6:12p Dave
57  * Fixed weapons loadout bugs with multiplayer respawning. Added
58  * multiplayer start screen. Fixed a few chatbox bugs.
59  * 
60  * 7     1/11/98 10:03p Allender
61  * removed <winsock.h> from headers which included it.  Made psnet_socket
62  * type which is defined just as SOCKET type is.
63  * 
64  * 6     12/29/97 5:21p Dave
65  * Put in object update sequencing for multiplayer.
66  * 
67  * 5     12/16/97 6:17p Dave
68  * Put in primary weapon support for multiplayer weapon select screen.
69  * 
70  * 4     12/10/97 4:46p Dave
71  * Added in more detailed support for multiplayer packet lag/loss. Fixed
72  * some multiplayer stuff. Added some controls to the standalone.
73  * 
74  * 3     12/01/97 4:59p Dave
75  * Synchronized multiplayer debris objects. Put in pilot popup in main
76  * hall. Optimized simulated multiplayer lag module. Fixed a potential
77  * file_xfer bug.
78  * 
79  * 2     11/28/97 5:06p Dave
80  * Put in facilities for simulating multiplayer lag.
81  * 
82  * 1     11/28/97 4:38p Dave
83  * Initial Revision
84  * 
85  * $NoKeywords: $
86  */
87
88 #ifndef _MULTI_LAG_HEADER_FILE
89 #define _MULTI_LAG_HEADER_FILE
90
91 #ifndef NDEBUG
92         // #define MULTI_USE_LAG                                                                
93 #endif
94
95 struct fd_set;
96 struct timeval;
97
98 // initialize multiplayer lagloss. in non-debug situations, this call does nothing
99 void multi_lag_init();
100
101 // shutdown multiplayer lag
102 void multi_lag_close();
103
104 // select for multi_lag
105 int multi_lag_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *except_fds, const timeval *timeout);
106
107 // recvfrom for multilag
108 int multi_lag_recvfrom(uint s, char *buf, int len, int flags, struct sockaddr *from, int *fromlen);
109
110 #endif
111