[enet-cvs] CVS: web api.txt,1.1,1.2 design.txt,1.1,1.2

Lee Salzman enet-discuss@lists.puremagic.com
Fri, 7 Mar 2003 18:49:15 -0700


Update of /home/enet/cvsroot/web
In directory sferik:/tmp/cvs-serv6604/web

Modified Files:
	api.txt design.txt 
Log Message:
Fixes to includes.


Index: api.txt
===================================================================
RCS file: /home/enet/cvsroot/web/api.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- api.txt	2003/03/07 20:26:18	1.1
+++ api.txt	2003/03/08 01:49:13	1.2
@@ -1,13 +1,13 @@
 <enet/enet.h> - The file that should be included to use the ENet API.
 
-uint8 - unsigned 8 bit integer
-uint16 - unsigned 16 bit integer
-uint32 - unsigned 32 bit integer
+enet_uint8 - unsigned 8 bit integer
+enet_uint16 - unsigned 16 bit integer
+enet_uint32 - unsigned 32 bit integer
 
 typedef struct
 {  
-  uint32 host; 
-  uint16 port; 
+  enet_uint32 host; 
+  enet_uint16 port; 
 } ENetAddress;
       
   Portable internet address structure. The host must be specified in network 
@@ -16,8 +16,8 @@
 
 typedef struct
 {
-  uint32 flags;
-  uint8 * data;
+  enet_uint32 flags;
+  enet_uint8 * data;
   size_t dataLength;
 } ENetPacket;
 
@@ -37,10 +37,10 @@
   ENetAddress address;
   void * data;
   size_t channelCount;
-  uint32 incomingBandwidth;
-  uint32 outgoingBandwidth;
-  uint32 roundTripTime;
-  uint32 packetLoss;
+  enet_uint32 incomingBandwidth;
+  enet_uint32 outgoingBandwidth;
+  enet_uint32 roundTripTime;
+  enet_uint32 packetLoss;
 } ENetPeer;
 
   An ENet peer which data packets may be sent or received from. No fields should be
@@ -67,7 +67,7 @@
 {
    ENetEventType        type;
    ENetPeer *           peer;
-   uint8                channelID;
+   enet_uint8                channelID;
    ENetPacket *         packet;
 } ENetEvent;
 
@@ -97,8 +97,8 @@
 typedef struct
 {
   ENetAddress address;
-  uint32 incomingBandwidth;
-  uint32 outgoingBandwidth;
+  enet_uint32 incomingBandwidth;
+  enet_uint32 outgoingBandwidth;
   ENetPeer * peers;
   size_t peerCount;
 } ENetHost;
@@ -123,12 +123,12 @@
   Macros that convert from network byte-order (big endian) to host 
 byte-order for unsigned integers of 8 bits, 16 bits, and 32 bits repectively.
 
-uint32 enet_time_get (void);
+enet_uint32 enet_time_get (void);
 
   Returns the wall-time in milliseconds. Its initial value is unspecified unless
 otherwise set.
 
-void enet_time_set (uint32);
+void enet_time_set (enet_uint32);
 
   Sets the current wall-time in milliseconds.
 
@@ -155,7 +155,7 @@
 hostName and nameLength. The host name is always null-delimited and will
 not exceed nameLength in length. Returns 0 on success and -1 on failure.
 
-ENetPacket * enet_packet_create (const void * dataContents, size_t dataLength, uint32 flags);
+ENetPacket * enet_packet_create (const void * dataContents, size_t dataLength, enet_uint32 flags);
 
   Creates a packet that may be sent to a peer. The dataContents parameter
 specifies the initial contents of the packet's data; the packet's data will
@@ -173,7 +173,7 @@
   Attempts to resize the data in the packet to the length specified in the
 dataLength parameter. Returns 0 on success and -1 on failure.
 
-ENetHost * enet_host_create (const ENetAddress * address, size_t peerCount, uint32 incomingBandwidth, uint32 outgoingBandwidth);
+ENetHost * enet_host_create (const ENetAddress * address, size_t peerCount, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth);
 
   Creates a host for communicating with peers. The address parameter specifies 
 the address at which other peers may connect to this host; if the address parameter
@@ -203,7 +203,7 @@
 on failure. The peer returned will have not completed the connection until enet_host_service
 notifies of an ENET_EVENT_TYPE_CONNECT event for the peer.
 
-int enet_host_service (ENetHost * host, ENetEvent * event, uint32 timeout);
+int enet_host_service (ENetHost * host, ENetEvent * event, enet_uint32 timeout);
 
   Waits for events on the host specified by the host parameters and shuttles packets 
 between the host and its peers. The event parameter specifies an event structure
@@ -219,24 +219,24 @@
 the designated peers. This function need only be used in circumstances where one
 wishes to send queued packets earlier than in a call to enet_host_service.
 
-void enet_host_broadcast (ENetHost * host, uint8 channelID, ENetPacket * packet);
+void enet_host_broadcast (ENetHost * host, enet_uint8 channelID, ENetPacket * packet);
 
   Queues a packet to be sent to all peers on the host specified in the host parameter
 over the channel number identified by the channelID parameter.
 
-void enet_host_bandwidth_limit (ENetHost * host, uint32 incomingBandwidth, uint32 outgoingBandwidth);
+void enet_host_bandwidth_limit (ENetHost * host, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth);
 
   Adjusts the bandwidth limits of the host specified in the host parameter. The
 incomingBandwidth and outgoingBandwidth parameters are as specified in a call to 
 enet_host_create.
 
-int enet_peer_send (ENetPeer * peer, uint8 channelID, ENetPacket * packet);
+int enet_peer_send (ENetPeer * peer, enet_uint8 channelID, ENetPacket * packet);
 
   Queues a packet to be sent to the peer specified by the peer parameter over the
 channel number identified by the channelID parameter. Returns 0 on success and -1
 on failure.
 
-ENetPacket * enet_peer_receive (ENetPeer * peer, uint8 channelID);
+ENetPacket * enet_peer_receive (ENetPeer * peer, enet_uint8 channelID);
 
   Attempts to dequeue any incoming queued packets on the peer specified by the peer
 parameter on the channel number identified by the channelID parameter. Returns a packet
@@ -261,7 +261,7 @@
 ENET_EVENT_DISCONNECT event will be generated by enet_host_service once the
 disconnection is complete.
 
-void enet_peer_throttle_configure (ENetPeer * peer, uint32 interval, uint32 acceleration, uint32 deceleration);
+void enet_peer_throttle_configure (ENetPeer * peer, enet_uint32 interval, enet_uint32 acceleration, enet_uint32 deceleration);
 
   Configures throttle parameter for the peer specified by the peer parameter.
 Unreliable packets are dropped by ENet in response to the varying conditions of

Index: design.txt
===================================================================
RCS file: /home/enet/cvsroot/web/design.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- design.txt	2003/03/07 21:38:42	1.1
+++ design.txt	2003/03/08 01:49:13	1.2
@@ -34,7 +34,7 @@
 
 * Sequencing
     
-    Rather than a a single byte stream that complicates the delineation 
+    Rather than a single byte stream that complicates the delineation 
 of packets, ENet presents connections as multiple, properly sequenced packet
 streams that simplify the transfer of various types of data.