Nilorea Library

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Macros Groups
Functions
n_network_msg.c File Reference
`#include "n_network_msg.h"`
Include dependency graph for n_network_msg.c:

Go to the source code of this file.

## Functions

double | double_swap (double value)
| Swap bytes endiannes for a double. More...
double | htond (double value)
| If needed swap bytes for a double. More...
double | ntohd (double value)
| If needed swap bytes for a double. More...
int | create_msg (NETW_MSG **msg)
| Create a NETW_MSG *object. More...
int | delete_msg (NETW_MSG **msg)
| Delete a NETW_MSG *object. More...
int | empty_msg (NETW_MSG **msg)
| Empty a NETW_MSG *object. More...
int | add_nb_to_msg (NETW_MSG *msg, double value)
| Add an float to the message. More...
int | add_int_to_msg (NETW_MSG *msg, int value)
| Add an int to the int list int the message. More...
int | add_nstrptr_to_msg (NETW_MSG *msg, N_STR *str)
| Add a string to the string list in the message. More...
int | add_nstrdup_to_msg (NETW_MSG *msg, N_STR *str)
| Add a copy of str to the string list in the message. More...
int | add_strdup_to_msg (NETW_MSG *msg, char *str)
| Add a copy of char *str to the string list in the message. More...
int | get_nb_from_msg (NETW_MSG *msg, double *value)
| Get a number from a message number list. More...
int | get_int_from_msg (NETW_MSG *msg, int *value)
| Get a number from a message number list. More...
int | get_nstr_from_msg (NETW_MSG *msg, N_STR **value)
| Get a string from a message string list. More...
int | get_str_from_msg (NETW_MSG *msg, char **value)
| Get a string from a message string list. More...
N_STR * | make_str_from_msg (NETW_MSG *msg)
| Make a single string of the message. More...
NETW_MSG * | make_msg_from_str (N_STR *str)
| Make a single message of the string. More...
int | netw_msg_get_type (N_STR *msg)
| Get the type of message without killing the first number. Use with netw_get_XXX. More...
int | netw_send_ident (NETWORK *netw, int type, int id, N_STR *name, N_STR *passwd)
| Add a formatted NETWMSG_IDENT message to the specified network. More...
int | netw_send_position (NETWORK *netw, int id, double X, double Y, double vx, double vy, double acc_x, double acc_y, int time_stamp)
| Add a formatted NETWMSG_IDENT message to the specified network. More...
int | netw_send_string_to_all (NETWORK *netw, int id, char *name, char *chan, char *txt, int color)
| Add a string to the network, aiming all server-side users. More...
int | netw_send_string_to (NETWORK *netw, int id_from, int id_to, char *name, char *txt, int color)
| Add a string to the network, aiming a specific user. More...
int | netw_send_ping (NETWORK *netw, int type, int id_from, int id_to, int time)
| Add a ping reply to the network. More...
int | netw_get_ident (N_STR *msg, int *type, int *ident, N_STR **name, N_STR **passwd)
| Retrieves identification from netwmsg. More...
int | netw_get_position (N_STR *msg, int *id, double *X, double *Y, double *vx, double *vy, double *acc_x, double *acc_y, int *time_stamp)
| Retrieves position from netwmsg. More...
int | netw_get_string (N_STR *msg, int *id, N_STR **name, N_STR **chan, N_STR **txt, int *color)
| Retrieves string from netwmsg. More...
int | netw_get_ping (N_STR *msg, int *type, int *from, int *to, int *time)
| Retrieves a ping travel elapsed time. More...

## Detailed Description

network messages function Network Engine

Author
  Castagnier Mickael

Version
  1.0

Date
  10/05/2005

Definition in file n_network_msg.c.