Files
skynet/skynet-src/skynet_server.h
2014-05-26 13:40:49 +08:00

29 lines
1.0 KiB
C

#ifndef SKYNET_SERVER_H
#define SKYNET_SERVER_H
#include <stdint.h>
#include <stdlib.h>
struct skynet_context;
struct skynet_message;
struct skynet_monitor;
struct skynet_context * skynet_context_new(const char * name, const char * parm);
void skynet_context_grab(struct skynet_context *);
struct skynet_context * skynet_context_release(struct skynet_context *);
uint32_t skynet_context_handle(struct skynet_context *);
void skynet_context_init(struct skynet_context *, uint32_t handle);
int skynet_context_push(uint32_t handle, struct skynet_message *message);
void skynet_context_send(struct skynet_context * context, void * msg, size_t sz, uint32_t source, int type, int session);
int skynet_context_newsession(struct skynet_context *);
struct message_queue * skynet_context_message_dispatch(struct skynet_monitor *, struct message_queue *); // return next queue
int skynet_context_total();
void skynet_context_endless(uint32_t handle); // for monitor
void skynet_globalinit(void);
void skynet_globalexit(void);
void skynet_initthread(int m);
#endif