[enet-cvs]
CVS: enet/include/enet Makefile.am, 1.1, 1.2 enet.h, 1.19,
1.20 protocol.h, 1.8, 1.9 unix.h, 1.2, 1.3 win32.h, 1.2, 1.3
Lee Salzman
enet at sferik.cubik.org
Mon Mar 29 13:43:18 PST 2004
- Next message: [enet-cvs] CVS: enet Makefile.am, 1.2, 1.3 configure.in, 1.2,
1.3 enet.dsp, 1.5, 1.6 host.c, 1.14, 1.15 packet.c, 1.6,
1.7 peer.c, 1.21, 1.22 protocol.c, 1.36, 1.37 unix.c, 1.11,
1.12 win32.c, 1.10, 1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/enet/cvsroot/enet/include/enet
In directory sferik:/tmp/cvs-serv2339/include/enet
Modified Files:
Makefile.am enet.h protocol.h unix.h win32.h
Log Message:
grab bag of fixes and updates for impending 1.0
Index: Makefile.am
===================================================================
RCS file: /home/enet/cvsroot/enet/include/enet/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile.am 2003/11/03 16:12:16 1.1
+++ Makefile.am 2004/03/29 21:43:15 1.2
@@ -4,7 +4,7 @@
list.h \
utility.h \
time.h \
- memory.h \
+ callbacks.h \
unix.h \
win32.h \
protocol.h \
Index: enet.h
===================================================================
RCS file: /home/enet/cvsroot/enet/include/enet/enet.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- enet.h 2003/12/22 04:31:49 1.19
+++ enet.h 2004/03/29 21:43:15 1.20
@@ -12,9 +12,6 @@
#include <stdlib.h>
-#include "enet/types.h"
-#include "enet/protocol.h"
-#include "enet/list.h"
#ifdef WIN32
#include "enet/win32.h"
@@ -22,23 +19,15 @@
#include "enet/unix.h"
#endif
-#ifdef ENET_API
-#undef ENET_API
-#endif
-
-#if defined WIN32
-#if defined ENET_DLL
-#if defined ENET_BUILDING_LIB
-#define ENET_API __declspec( dllexport )
-#else
-#define ENET_API __declspec( dllimport )
-#endif /* ENET_BUILDING_LIB */
-#endif /* ENET_DLL */
-#endif /* WIN32 */
+#include "enet/types.h"
+#include "enet/protocol.h"
+#include "enet/list.h"
+#include "enet/callbacks.h"
-#ifndef ENET_API
-#define ENET_API extern
-#endif
+typedef enum
+{
+ ENET_VERSION = 1
+} ENetVersion;
typedef enum
{
@@ -84,7 +73,11 @@
{
/** packet must be received by the target peer and resend attempts should be
* made until the packet is delivered */
- ENET_PACKET_FLAG_RELIABLE = (1 << 0)
+ ENET_PACKET_FLAG_RELIABLE = (1 << 0),
+ /** packet will not be sequenced with other packets
+ * not supported for reliable packets
+ */
+ ENET_PACKET_FLAG_UNSEQUENCED = (1 << 1)
} ENetPacketFlag;
/**
@@ -173,7 +166,8 @@
ENET_PEER_PACKET_LOSS_INTERVAL = 10000,
ENET_PEER_WINDOW_SIZE_SCALE = 64 * 1024,
ENET_PEER_TIMEOUT_LIMIT = 32,
- ENET_PEER_PING_INTERVAL = 500
+ ENET_PEER_PING_INTERVAL = 500,
+ ENET_PEER_UNSEQUENCED_WINDOW_SIZE = 4 * 32
};
typedef struct _ENetChannel
@@ -238,6 +232,9 @@
ENetList sentUnreliableCommands;
ENetList outgoingReliableCommands;
ENetList outgoingUnreliableCommands;
+ enet_uint32 incomingUnsequencedGroup;
+ enet_uint32 outgoingUnsequencedGroup;
+ enet_uint32 unsequencedWindow [ENET_PEER_UNSEQUENCED_WINDOW_SIZE / 32];
} ENetPeer;
/** An ENet host for communicating with peers.
@@ -329,6 +326,8 @@
*/
ENET_API int enet_initialize (void);
+ENET_API int enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks * inits);
+
/**
Shuts down ENet globally. Should be called when a program that has
initialized ENet exits.
@@ -374,7 +373,7 @@
@retval < 0 on failure
@returns the address of the given hostName in address on success
*/
-extern int enet_address_set_host (ENetAddress *address, const char *hostName );
+ENET_API int enet_address_set_host (ENetAddress *address, const char *hostName );
/** Attempts to do a reserve lookup of the host field in the address parameter.
@param address address used for reverse lookup
@@ -384,7 +383,7 @@
@retval 0 on success
@retval < 0 on failure
*/
-extern int enet_address_get_host (const ENetAddress *address, char *hostName, size_t nameLength );
+ENET_API int enet_address_get_host (const ENetAddress *address, char *hostName, size_t nameLength );
/** @} */
Index: protocol.h
===================================================================
RCS file: /home/enet/cvsroot/enet/include/enet/protocol.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- protocol.h 2003/10/30 15:55:32 1.8
+++ protocol.h 2004/03/29 21:43:15 1.9
@@ -30,12 +30,14 @@
ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE = 7,
ENET_PROTOCOL_COMMAND_SEND_FRAGMENT = 8,
ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT = 9,
- ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE = 10
+ ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE = 10,
+ ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED = 11
} ENetProtocolCommand;
typedef enum
{
- ENET_PROTOCOL_FLAG_ACKNOWLEDGE = (1 << 0)
+ ENET_PROTOCOL_FLAG_ACKNOWLEDGE = (1 << 0),
+ ENET_PROTOCOL_FLAG_UNSEQUENCED = (1 << 1)
} ENetProtocolFlag;
typedef struct
@@ -131,6 +133,12 @@
typedef struct
{
ENetProtocolCommandHeader header;
+ enet_uint32 unsequencedGroup;
+} ENetProtocolSendUnsequenced;
+
+typedef struct
+{
+ ENetProtocolCommandHeader header;
enet_uint32 startSequenceNumber;
enet_uint32 fragmentCount;
enet_uint32 fragmentNumber;
@@ -148,6 +156,7 @@
ENetProtocolPing ping;
ENetProtocolSendReliable sendReliable;
ENetProtocolSendUnreliable sendUnreliable;
+ ENetProtocolSendUnsequenced sendUnsequenced;
ENetProtocolSendFragment sendFragment;
ENetProtocolBandwidthLimit bandwidthLimit;
ENetProtocolThrottleConfigure throttleConfigure;
Index: unix.h
===================================================================
RCS file: /home/enet/cvsroot/enet/include/enet/unix.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- unix.h 2003/03/08 23:57:25 1.2
+++ unix.h 2004/03/29 21:43:15 1.3
@@ -28,5 +28,9 @@
size_t dataLength;
} ENetBuffer;
+#define ENET_CALLBACK
+
+#define ENET_API extern
+
#endif /* __ENET_UNIX_H__ */
Index: win32.h
===================================================================
RCS file: /home/enet/cvsroot/enet/include/enet/win32.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- win32.h 2003/03/08 23:57:25 1.2
+++ win32.h 2004/03/29 21:43:15 1.3
@@ -27,6 +27,16 @@
void * data;
} ENetBuffer;
+#define ENET_CALLBACK __cdecl
+
+#if defined ENET_DLL
+#if defined ENET_BUILDING_LIB
+#define ENET_API __declspec( dllexport )
+#else
+#define ENET_API __declspec( dllimport )
+#endif /* ENET_BUILDING_LIB */
+#endif /* ENET_DLL */
+
#endif /* __ENET_WIN32_H__ */
- Next message: [enet-cvs] CVS: enet Makefile.am, 1.2, 1.3 configure.in, 1.2,
1.3 enet.dsp, 1.5, 1.6 host.c, 1.14, 1.15 packet.c, 1.6,
1.7 peer.c, 1.21, 1.22 protocol.c, 1.36, 1.37 unix.c, 1.11,
1.12 win32.c, 1.10, 1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the enet-cvs
mailing list