skynet_handle.h 575 B

1234567891011121314151617181920212223
  1. #ifndef SKYNET_CONTEXT_HANDLE_H
  2. #define SKYNET_CONTEXT_HANDLE_H
  3. #include <stdint.h>
  4. // reserve high 8 bits for remote id
  5. #define HANDLE_MASK 0xffffff
  6. #define HANDLE_REMOTE_SHIFT 24
  7. struct skynet_context;
  8. uint32_t skynet_handle_register(struct skynet_context *);
  9. int skynet_handle_retire(uint32_t handle);
  10. struct skynet_context * skynet_handle_grab(uint32_t handle);
  11. void skynet_handle_retireall();
  12. uint32_t skynet_handle_findname(const char * name);
  13. const char * skynet_handle_namehandle(uint32_t handle, const char *name);
  14. void skynet_handle_init(int harbor);
  15. #endif