~ubuntu-branches/ubuntu/hardy/sauerbraten/hardy-backports

« back to all changes in this revision

Viewing changes to enet/include/enet/enet.h

  • Committer: Bazaar Package Importer
  • Author(s): Bruno "Fuddl" Kleinert, Bruno "Fuddl" Kleinert, Cyril Brulebois
  • Date: 2007-08-26 17:45:25 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070826174525-uiv5yjjk092m95cl
Tags: 0.0.20070819.dfsg-1
[ Bruno "Fuddl" Kleinert ]
* Update the Debian menu file to the latest menu structure
* Remove 10_save_and_load_maps_from_home_directory.dpatch (Upstream solved
  this in this release) (Closes: #426691)
* Remove 10_search_home_for_config.dpatch (Upstream solved this in this
  release)
* Add 10_fix_clean_target.dpatch to avoid calling autotools in clean target
* Add NEWS.Debian

[ Cyril Brulebois ]
* Added XS-Vcs-Svn and XS-Vcs-Browser fields in the control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
enum
45
45
{
46
46
   ENET_HOST_ANY       = 0,            /**< specifies the default server host */
47
 
   ENET_HOST_BROADCAST = 0xFFFFFFFF    /**< specifies a subnet-wide broadcast */
 
47
   ENET_HOST_BROADCAST = 0xFFFFFFFF,   /**< specifies a subnet-wide broadcast */
 
48
 
 
49
   ENET_PORT_ANY       = 0             /**< specifies that a port should be automatically chosen */
48
50
};
49
51
 
50
52
/**
99
101
 *
100
102
 *    ENET_PACKET_FLAG_RELIABLE - packet must be received by the target peer
101
103
 *    and resend attempts should be made until the packet is delivered
 
104
 *
 
105
 *    ENET_PACKET_FLAG_UNSEQUENCED - packet will not be sequenced with other packets 
 
106
 *    (not supported for reliable packets)
 
107
 *
 
108
 *    ENET_PACKET_FLAG_NO_ALLOCATE - packet will not allocate data, and user must supply it instead
102
109
 
103
110
   @sa ENetPacketFlag
104
111
 */
105
112
typedef struct _ENetPacket
106
113
{
107
114
   size_t                   referenceCount;  /**< internal use only */
108
 
   enet_uint32              flags;           /**< bitwise or of ENetPacketFlag constants */
 
115
   enet_uint32              flags;           /**< bitwise-or of ENetPacketFlag constants */
109
116
   enet_uint8 *             data;            /**< allocated data for packet */
110
117
   size_t                   dataLength;      /**< length of data */
111
118
   ENetPacketFreeCallback   freeCallback;    /**< function to be called when the packet is no longer in use */
348
355
*/
349
356
ENET_API int enet_initialize (void);
350
357
 
351
 
ENET_API int enet_initialize_with_callbacks (ENetVersion, const ENetCallbacks *);
 
358
/** 
 
359
  Initializes ENet globally and supplies user-overridden callbacks. Must be called prior to using any functions in ENet. Do not use enet_initialize() if you use this variant.
 
360
 
 
361
  @param version the constant ENET_VERSION should be supplied so ENet knows which version of ENetCallbacks struct to use
 
362
  @param inits user-overriden callbacks where any NULL callbacks will use ENet's defaults
 
363
  @returns 0 on success, < 0 on failure
 
364
*/
 
365
ENET_API int enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks * inits);
352
366
 
353
367
/** 
354
368
  Shuts down ENet globally.  Should be called when a program that has