zenilib: zenilib/jni/external/sdl_net/SDLnet.c File Reference

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
Functions | Variables
SDLnet.c File Reference
`#include "SDLnetsys.h"`
`#include "SDL_net.h"`
`#include <signal.h>`

Go to the source code of this file.

## Functions

const char *SDLCALL | SDLNet_GetError (void)
int | SDLNet_GetLastError (void)
int | SDLNet_GetLocalAddresses (IPaddress *addresses, int maxcount)
int | SDLNet_Init (void)
const SDLNet_version * | SDLNet_Linked_Version (void)
void | SDLNet_Quit (void)
DECLSPEC Uint16 SDLCALL | SDLNet_Read16 (void *area)
DECLSPEC Uint32 SDLCALL | SDLNet_Read32 (const void *area)
int | SDLNet_ResolveHost (IPaddress *address, const char *host, Uint16 port)
const char * | SDLNet_ResolveIP (const IPaddress *ip)
void SDLCALL | SDLNet_SetError (const char *fmt,...)
void | SDLNet_SetLastError (int err)
DECLSPEC void SDLCALL | SDLNet_Write16 (Uint16 value, void *area)
DECLSPEC void SDLCALL | SDLNet_Write32 (Uint32 value, void *area)

## Variables

static char | errorbuf [1024]
static int | SDLNet_started = 0

## Function Documentation

const char* SDLCALL SDLNet_GetError | ( | void |  | ) |

Definition at line 76 of file SDLnet.c.

References errorbuf, and SDL_GetError().

Referenced by main(), and print_errors().

int SDLNet_GetLastError | ( | void |  | ) |

Definition at line 51 of file SDLnet.c.

Referenced by SDLNet_CheckSockets(), SDLNet_TCP_Recv(), SDLNet_TCP_Send(), and SocketReady().

int SDLNet_GetLocalAddresses | ( | IPaddress * | addresses,
|  | int | maxcount
| ) |  |

Definition at line 187 of file SDLnet.c.

References closesocket, DWORD(), free, IPaddress::host, INVALID_SOCKET, malloc, NULL, IPaddress::port, realloc, sock, and SOCKET.

Referenced by main().

int SDLNet_Init | ( | void |  | ) |

Definition at line 86 of file SDLnet.c.

References int, SDLNet_SetError(), and SDLNet_started.

Referenced by main().

const SDLNet_version* SDLNet_Linked_Version | ( | void |  | ) |

Definition at line 33 of file SDLnet.c.

References SDL_NET_VERSION.

void SDLNet_Quit | ( | void |  | ) |

Definition at line 110 of file SDLnet.c.

References int, SDLNet_started, and SOCKET_ERROR.

Referenced by cleanup().

Uint16 SDLNet_Read16 | ( | void * | area | ) |

Definition at line 287 of file SDLnet.c.

References SDL_SwapBE16.

Uint32 SDLNet_Read32 | ( | const void * | area | ) |

Definition at line 292 of file SDLnet.c.

References SDL_SwapBE32.

int SDLNet_ResolveHost | ( | IPaddress * | address,
|  | const char * | host,
|  | Uint16 | port
| ) |  |

Definition at line 138 of file SDLnet.c.

References IPaddress::host, INADDR_ANY, INADDR_NONE, memcpy, NULL, IPaddress::port, and SDLNet_Read16.

Referenced by main(), and Zeni::Net::resolve_host().

const char* SDLNet_ResolveIP | ( | const IPaddress * | ip | ) |

Definition at line 173 of file SDLnet.c.

References IPaddress::host, and NULL.

Referenced by main(), and Zeni::Net::reverse_lookup().

void SDLCALL SDLNet_SetError | ( | const char * | fmt,
|  |  | ...
| ) |  |

Definition at line 65 of file SDLnet.c.

References errorbuf, SDL_SetError(), and SDL_vsnprintf().

Referenced by SDLNet_AddSocket(), SDLNet_AllocPacket(), SDLNet_AllocPacketV(), SDLNet_DelSocket(), SDLNet_Init(), SDLNet_TCP_Accept(), SDLNet_TCP_Open(), SDLNet_TCP_Recv(), SDLNet_TCP_Send(), SDLNet_UDP_Bind(), SDLNet_UDP_Open(), SDLNet_UDP_SendV(), and ValidChannel().

void SDLNet_SetLastError | ( | int | err | ) |

Definition at line 56 of file SDLnet.c.

Referenced by SDLNet_CheckSockets(), SDLNet_TCP_Recv(), SDLNet_TCP_Send(), and SocketReady().

void SDLNet_Write16 | ( | Uint16 | value,
|  | void * | area
| ) |  |

Definition at line 277 of file SDLnet.c.

References SDL_SwapBE16.

void SDLNet_Write32 | ( | Uint32 | value,
|  | void * | area
| ) |  |

Definition at line 282 of file SDLnet.c.

References SDL_SwapBE32.

## Variable Documentation

char errorbuf[1024]

static

Definition at line 63 of file SDLnet.c.

Referenced by SDLNet_GetError(), and SDLNet_SetError().

int SDLNet_started = 0

static

Definition at line 43 of file SDLnet.c.

Referenced by SDLNet_Init(), and SDLNet_Quit().