enet.h   enet.h 
skipping to change at line 49 skipping to change at line 49
ENET_SOCKET_WAIT_NONE = 0, ENET_SOCKET_WAIT_NONE = 0,
ENET_SOCKET_WAIT_SEND = (1 << 0), ENET_SOCKET_WAIT_SEND = (1 << 0),
ENET_SOCKET_WAIT_RECEIVE = (1 << 1) ENET_SOCKET_WAIT_RECEIVE = (1 << 1)
} ENetSocketWait; } ENetSocketWait;
typedef enum typedef enum
{ {
ENET_SOCKOPT_NONBLOCK = 1, ENET_SOCKOPT_NONBLOCK = 1,
ENET_SOCKOPT_BROADCAST = 2, ENET_SOCKOPT_BROADCAST = 2,
ENET_SOCKOPT_RCVBUF = 3, ENET_SOCKOPT_RCVBUF = 3,
ENET_SOCKOPT_SNDBUF = 4 ENET_SOCKOPT_SNDBUF = 4,
ENET_SOCKOPT_REUSEADDR = 5
} ENetSocketOption; } ENetSocketOption;
enum enum
{ {
ENET_HOST_ANY = 0, /**< specifies the default server ho st */ ENET_HOST_ANY = 0, /**< specifies the default server ho st */
ENET_HOST_BROADCAST = 0xFFFFFFFF, /**< specifies a subnet-wide broadca st */ ENET_HOST_BROADCAST = 0xFFFFFFFF, /**< specifies a subnet-wide broadca st */
ENET_PORT_ANY = 0 /**< specifies that a port should be automatically chosen */ ENET_PORT_ANY = 0 /**< specifies that a port should be automatically chosen */
}; };
skipping to change at line 406 skipping to change at line 407
*/ */
ENET_API enet_uint32 enet_time_get (void); ENET_API enet_uint32 enet_time_get (void);
/** /**
Sets the current wall-time in milliseconds. Sets the current wall-time in milliseconds.
*/ */
ENET_API void enet_time_set (enet_uint32); ENET_API void enet_time_set (enet_uint32);
/** @defgroup socket ENet socket functions /** @defgroup socket ENet socket functions
@{ @{
*/ */
ENET_API ENetSocket enet_socket_create (ENetSocketType, const ENetAddress * ENET_API ENetSocket enet_socket_create (ENetSocketType);
); ENET_API int enet_socket_bind (ENetSocket, const ENetAddress *);
ENET_API int enet_socket_listen (ENetSocket, int);
ENET_API ENetSocket enet_socket_accept (ENetSocket, ENetAddress *); ENET_API ENetSocket enet_socket_accept (ENetSocket, ENetAddress *);
ENET_API int enet_socket_connect (ENetSocket, const ENetAddress *); ENET_API int enet_socket_connect (ENetSocket, const ENetAddress *);
ENET_API int enet_socket_send (ENetSocket, const ENetAddress *, cons t ENetBuffer *, size_t); ENET_API int enet_socket_send (ENetSocket, const ENetAddress *, cons t ENetBuffer *, size_t);
ENET_API int enet_socket_receive (ENetSocket, ENetAddress *, ENetBuf fer *, size_t); ENET_API int enet_socket_receive (ENetSocket, ENetAddress *, ENetBuf fer *, size_t);
ENET_API int enet_socket_wait (ENetSocket, enet_uint32 *, enet_uint3 2); ENET_API int enet_socket_wait (ENetSocket, enet_uint32 *, enet_uint3 2);
ENET_API int enet_socket_set_option (ENetSocket, ENetSocketOption, i nt); ENET_API int enet_socket_set_option (ENetSocket, ENetSocketOption, i nt);
ENET_API void enet_socket_destroy (ENetSocket); ENET_API void enet_socket_destroy (ENetSocket);
ENET_API int enet_socketset_select (ENetSocket, ENetSocketSet *, ENe tSocketSet *, enet_uint32);
/** @} */ /** @} */
/** @defgroup Address ENet address functions /** @defgroup Address ENet address functions
@{ @{
*/ */
/** Attempts to resolve the host named by the parameter hostName and sets /** Attempts to resolve the host named by the parameter hostName and sets
the host field in the address parameter if successful. the host field in the address parameter if successful.
@param address destination to store resolved address @param address destination to store resolved address
@param hostName host name to lookup @param hostName host name to lookup
 End of changes. 3 change blocks. 
3 lines changed or deleted 6 lines changed or added


 unix.h   unix.h 
/** /**
@file unix.h @file unix.h
@brief ENet Unix header @brief ENet Unix header
*/ */
#ifndef __ENET_UNIX_H__ #ifndef __ENET_UNIX_H__
#define __ENET_UNIX_H__ #define __ENET_UNIX_H__
#include <stdlib.h> #include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h> #include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <unistd.h>
typedef int ENetSocket; typedef int ENetSocket;
enum enum
{ {
ENET_SOCKET_NULL = -1 ENET_SOCKET_NULL = -1
}; };
#define ENET_HOST_TO_NET_16(value) (htons (value)) /**< macro that converts host to net byte-order of a 16-bit value */ #define ENET_HOST_TO_NET_16(value) (htons (value)) /**< macro that converts host to net byte-order of a 16-bit value */
#define ENET_HOST_TO_NET_32(value) (htonl (value)) /**< macro that converts host to net byte-order of a 32-bit value */ #define ENET_HOST_TO_NET_32(value) (htonl (value)) /**< macro that converts host to net byte-order of a 32-bit value */
skipping to change at line 35 skipping to change at line 37
typedef struct typedef struct
{ {
void * data; void * data;
size_t dataLength; size_t dataLength;
} ENetBuffer; } ENetBuffer;
#define ENET_CALLBACK #define ENET_CALLBACK
#define ENET_API extern #define ENET_API extern
typedef fd_set ENetSocketSet;
#define ENET_SOCKETSET_EMPTY(sockset) FD_ZERO (& (sockset))
#define ENET_SOCKETSET_ADD(sockset, socket) FD_SET (socket, & (sockset))
#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLEAR (socket, & (sockset
))
#define ENET_SOCKETSET_CHECK(sockset, socket) FD_ISSET (socket, & (sockset
))
#endif /* __ENET_UNIX_H__ */ #endif /* __ENET_UNIX_H__ */
 End of changes. 3 change blocks. 
0 lines changed or deleted 11 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/