skynet_harbor.h 571 B

1234567891011121314151617181920212223242526272829
  1. #ifndef SKYNET_HARBOR_H
  2. #define SKYNET_HARBOR_H
  3. #include <stdint.h>
  4. #include <stdlib.h>
  5. #define GLOBALNAME_LENGTH 16
  6. #define REMOTE_MAX 256
  7. struct remote_name {
  8. char name[GLOBALNAME_LENGTH];
  9. uint32_t handle;
  10. };
  11. struct remote_message {
  12. struct remote_name destination;
  13. const void * message;
  14. size_t sz;
  15. int type;
  16. };
  17. void skynet_harbor_send(struct remote_message *rmsg, uint32_t source, int session);
  18. int skynet_harbor_message_isremote(uint32_t handle);
  19. void skynet_harbor_init(int harbor);
  20. void skynet_harbor_start(void * ctx);
  21. void skynet_harbor_exit();
  22. #endif