zenilib: zenilib/jni/external/sdl_subst/SDL/SDL_net.h Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SDL_net.h
Go to the documentation of this file.
1 #ifndef SDL_NET_H
2 #define SDL_NET_H
3
4 #include <SDL/SDL_stdinc.h>
5 #include <netinet/in.h>
6
7 struct IPaddress {
8 Uint32 host;
9 Uint16 port;
10 };
11
12 inline Uint16 SDLNet_Read16(const void * const &area) {
13 return ntohs(*static_cast<const Uint16 *>(area));
14 }
15
16 inline Uint32 SDLNet_Read32(const void * const &area) {
17 return ntohl(*static_cast<const Uint32 *>(area));
18 }
19
20 inline void SDLNet_Write16(const Uint32 &value, void * const &area) {
21 *static_cast< Uint16 *>(area) = htons(value);
22 }
23
24 inline void SDLNet_Write32(const Uint32 &value, void * const &area) {
25 *static_cast< Uint32 *>(area) = htonl(value);
26 }
27
28 #endif
SDLNet_Write16
#define SDLNet_Write16(value, areap)
Definition: SDL_net.h:376
IPaddress::host
Uint32 host
Definition: SDL_net.h:91
IPaddress
Definition: SDL_net.h:90
SDLNet_Write32
#define SDLNet_Write32(value, areap)
Definition: SDL_net.h:377
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
SDLNet_Read32
#define SDLNet_Read32(areap)
Definition: SDL_net.h:381
IPaddress::port
Uint16 port
Definition: SDL_net.h:92
value
EGLSurface EGLint void ** value
Definition: eglext.h:301
Uint16
uint16_t Uint16
An unsigned 16-bit integer type.
Definition: SDL_stdinc.h:137
SDLNet_Read16
#define SDLNet_Read16(areap)
Definition: SDL_net.h:380