1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
package main
const (
// Reporting an error from the lib.
// - allowed contexts: Event, Response
// - msg slot_a = utf8 error id ptr
// - msg slot_b = utf8 error id len
// - msg slot_c = utf8 error info ptr
// - msg slot_d = utf8 error info len
TyErr UintPtrT = 0xffff
// A tracing message published by the lib.
// - allowed contexts: Event
// - msg slot_a: logging level
// - msg slot_b: utf8 info ptr
// - msg slot_c: utf8 info len
TyOnTrace UintPtrT = 0xfffe
// Request a go buffer be created / giving access to said buffer in resp.
// - allowed contexts: Call, Response
// - msg slot_a: buffer id
TyBufferAlloc UintPtrT = 0x8001
// Request an existing buffer be released. It will no longer be accessible.
// - allowed contexts: Call, Response
// - call slot_a: buffer id
TyBufferFree UintPtrT = 0x8002
// Request access to an existing buffer.
// - allowed contexts: Call, Response
// - call slot_a: buffer id
// - msg slot_a: buffer id
// - msg slot_b: buffer ptr
// - msg slot_c: buffer len
TyBufferAccess UintPtrT = 0x8003
// Request additional space be reserved for appending to buffer.
// - allowed contexts: Call, Response
// - call slot_a: buffer id
// - call slot_b: additional length
TyBufferReserve UintPtrT = 0x8004
// Request existing buffer be extended with provided additional bytes.
// - allowed contexts: Call, Response
// - call slot_a: buffer id
// - call slot_b: additional bytes ptr
// - call slot_c: additional bytes len
TyBufferExtend UintPtrT = 0x8005
// Request access to bytes at beginning of existing buffer, advancing the
// read cursor.
// - allowed contexts: Call, Response
// - call slot_a: buffer id
// - call slot_b: max read length
// - msg slot_a: buffer ptr
// - msg slot_b: buffer len
TyBufferRead UintPtrT = 0x8006
// Request a new peer connection be opened.
// - allowed contexts: Call, Response
// - call slot_a: config buffer id
// - msg slot_a: peer_con id
TyPeerConAlloc UintPtrT = 0x9001
// Request an existing peer con be closed and released.
// - allowed contexts: Call, Response
// - call slot_a: peer_con id
TyPeerConFree UintPtrT = 0x9002
// Request an existing peer con create an offer.
// - allowed contexts: Call, Response
// - call slot_a: peer_con id
// - call slot_b: config buffer id
// - msg slot_a: offer buffer id
TyPeerConCreateOffer UintPtrT = 0x9003
// Request an existing peer con create an answer.
// - allowed contexts: Call, Response
// - call slot_a: peer_con id
// - call slot_b: config buffer id
// - msg slot_a: answer buffer id
TyPeerConCreateAnswer UintPtrT = 0x9004
// Request an existing peer con set local description.
// - allowed contexts: Call, Response
// - call slot_a: peer_con id
// - call slot_b: desc buffer id
TyPeerConSetLocalDesc UintPtrT = 0x9005
// Request an existing peer con set rem description.
// - allowed contexts: Call, Response
// - call slot_a: peer_con id
// - call slot_b: desc buffer id
TyPeerConSetRemDesc UintPtrT = 0x9006
// Request an existing peer con add ice candidate.
// - allowed contexts: Call, Response
// - call slot_a: peer_con id
// - call slot_b: ice buffer id
TyPeerConAddICECandidate UintPtrT = 0x9007
// Request an existing peer con create a new data channel.
// - allowed contexts: Call, Response
// - call slot_a: peer_con id
// - call slot_b: config buffer id
TyPeerConCreateDataChan UintPtrT = 0x9008
// OnICECandidate event on an existing peer con.
// - allowed contexts: Event
// - msg slot_a: peer_con id
// - msg slot_b: ice buffer id
TyPeerConOnICECandidate UintPtrT = 0x9801
// OnConStateChange event on an existing peer con.
// - allowed contexts: Event
// - msg slot_a: peer_con id
// - msg slot_b: state id
TyPeerConOnStateChange UintPtrT = 0x9802
// OnDataChannel event on an existing peer con.
// - allowed contexts: Event
// - msg slot_a: peer_con id
// - msg slot_b: data_chan id
TyPeerConOnDataChannel UintPtrT = 0x9803
// Request an existing data chan be closed and released.
// - allowed contexts: Call, Response
// - call slot_a: data_chan id
TyDataChanFree UintPtrT = 0xa002
// Request the ready state of an existing data channel..
// - allowed contexts: Call, Response
// - call slot_a: data_chan id
// - msg slot_a: ready state
TyDataChanReadyState UintPtrT = 0xa003
// Request an existing data chan send data to the remote end.
// - allowed contexts: Call, Response
// - call slot_a: data_chan id
// - call slot_b: buffer id
TyDataChanSend UintPtrT = 0xa004
// Request the label of an existing data channel..
// - allowed contexts: Call, Response
// - call slot_a: data_chan id
// - msg slot_a: label buffer id
TyDataChanLabel UintPtrT = 0xa005
// OnClose event on an existing data chan.
// - allowed contexts: Event
// - msg slot_a: data_chan id
TyDataChanOnClose UintPtrT = 0xa801
// OnOpen event on an existing data chan.
// - allowed contexts: Event
// - msg slot_a: data_chan id
TyDataChanOnOpen UintPtrT = 0xa802
// OnError event on an existing data chan.
// - allowed contexts: Event
// - msg slot_a: data_chan id
// - msg slot_b: data ptr
// - msg slot_c: data len
TyDataChanOnError UintPtrT = 0xa803
// OnMessage event on an existing data chan.
// - allowed contexts: Event
// - msg slot_a: data_chan id
// - msg slot_b: data ptr
// - msg slot_c: data len
TyDataChanOnMessage UintPtrT = 0xa804
)