6 typedef struct _psmb_ctx psmb_ctx_t;
7 typedef struct _psmb_result psmb_result_t;
9 psmb_ctx_t *psmb_new(void);
10 psmb_ctx_t *psmb_new_mm(void *(*malloc)(size_t size),
11 void (*free)(void *ptr),
12 void *(*realloc)(void *ptr, size_t size));
13 psmb_result_t psmb_set_pmtu(psmb_ctx_t *ctx, unsigned int pmtu);
14 psmb_result_t psmb_set_port(psmb_ctx_t *ctx, unsigned short pmtu);
15 psmb_result_t psmb_open(psmb_ctx_t *ctx);
16 void psmb_destroy(psmb_ctx_t *ctx);
17 int psmb_getfd(psmb_ctx_t *ctx);
18 bool psmb_need_write_wait(psmb_result_t result);
19 psmb_result_t psmb_ev_rd(psmb_ctx_t *ctx);
20 psmb_result_t psmb_ev_wr(psmb_ctx_t *ctx);
21 psmb_result_t psmb_ev_ex(psmb_ctx_t *ctx);
22 psmb_result_t psmb_subscribe(psmb_ctx_t *ctx, char *channel);
23 psmb_result_t psmb_publish(psmb_ctx_t *ctx, char *channel,
24 void *data, size_t size);
25 bool psmb_message(psmb_ctx_t *ctx, char **channel,
26 void **data, size_t *size);