O2 2.0
A communication protocol for interactive music and media applications.
msgsend.h
1//
2// msgsend.h - send messages
3//
4// Roger B. Dannenberg
5// April 2020
6
7#ifndef MSGSEND_H
8#define MSGSEND_H
9
10// if MSG_NOSIGNAL is an option for send(), then use it;
11// otherwise, give it a legal innocuous value as a flag:
12#ifndef MSG_NOSIGNAL
13#define MSG_NOSIGNAL 0
14#endif
15
17 O2message_ptr head;
18 O2message_ptr tail;
19public:
21 void enqueue(O2message_ptr msg);
22 O2message_ptr dequeue();
23 bool empty();
24};
25
26extern Pending_msgs_queue o2_pending_local;
27extern Pending_msgs_queue o2_pending_anywhere;
28
29
30void o2_drop_msg_data(const char *warn, o2_msg_data_ptr data);
31
32void o2_prepare_to_deliver(O2message_ptr msg);
33
34extern int o2_do_not_reenter; // counter to allow nesting
35
36void o2_deliver_pending(void);
37
38// free any remaining messages after O2 has been shut down
39void o2_free_pending_msgs(void);
40
51void o2_msg_deliver(O2node *service, Services_entry *services);
52
53
60void o2_send_to_taps(O2message_ptr msg, Services_entry *ss);
61
62
63O2err o2_msg_send_now();
64
65void o2_call_handler(Handler_entry *handler, o2_msg_data_ptr msg,
66 const char *types);
67
68O2node *o2_msg_service(o2_msg_data_ptr msg, Services_entry **services);
69
70// int o2_send_message(Fds_info *proc, int blocking);
71
72void o2_send_local(O2node *service, Services_entry *ss);
73
74// void o2_queue_message(O2message_ptr msg, Fds_info *proc);
75
76#endif /* o2_send_h */
Definition: o2node.h:246
Definition: o2node.h:132
Definition: msgsend.h:16
Definition: services.h:24
O2err
return values used generally by O2 functions
Definition: o2.h:329
an O2 message container
Definition: o2.h:690
data part of an O2 message
Definition: o2.h:638