Chimera: chimera_0-9/src/message.c File Reference

- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# message.c File Reference

`#include <stdio.h>`
`#include <unistd.h>`
`#include <stdlib.h>`
`#include <sys/socket.h>`
`#include <netinet/in.h>`
`#include <arpa/inet.h>`
`#include <pthread.h>`
`#include <errno.h>`
`#include <string.h>`
`#include "chimera.h"`
`#include "message.h"`
`#include "job_queue.h"`
`#include "log.h"`
`#include "network.h"`
`#include "jval.h"`

## Classes
struct | MessageGlobal
struct | MessageProperty
## Defines
#define | HEADER_SIZE (sizeof(unsigned long) + sizeof(unsigned long) + KEY_SIZE/BASE_B)
#define | MAX_RETRY 3
## Functions
Message * | message_create (Key dest, int type, int size, char *payload)
void | message_free (Message *msg)
void * | message_init (void *chstate, int port)
void | message_reciever (void *chstate, Message *message)
void | message_recieved (void *chstate, char *data, int size)
void | message_handler (void *chstate, int type, messagehandler_t func, int ack)
int | message_send (void *chstate, ChimeraHost *host, Message *message, int retry)

## Define Documentation

#define HEADER_SIZE (sizeof(unsigned long) + sizeof(unsigned long) + KEY_SIZE/BASE_B)

#define MAX_RETRY 3

## Function Documentation

Message* message_create | ( | Key | dest,
|  | int | type,
|  | int | size,
|  | char * | payload
| ) |

void message_free | ( | Message * | msg | ) |

void message_handler | ( | void * | chstate,
|  | int | type,
|  | messagehandler_t | func,
|  | int | ack
| ) |

void* message_init | ( | void * | chstate,
|  | int | port
| ) |

void message_recieved | ( | void * | chstate,
|  | char * | data,
|  | int | size
| ) |

void message_reciever | ( | void * | chstate,
|  | Message * | message
| ) |

int message_send | ( | void * | chstate,
|  | ChimeraHost * | host,
|  | Message * | message,
|  | int | retry
| ) |