blob: d8463990b3b2fedac9be96a365f05ec07774b1d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package salticidae
// #include <stdlib.h>
// #include "salticidae/msg.h"
import "C"
type Msg = *C.struct_msg_t
func NewMsg(opcode Opcode, _moved_payload ByteArray) Msg {
return C.msg_new(C._opcode_t(opcode), _moved_payload)
}
func (self Msg) Free() { C.msg_free(self) }
func (self Msg) GetPayload() DataStream {
return C.msg_get_payload(self)
}
func (self Msg) GetOpcode() Opcode {
return Opcode(C.msg_get_opcode(self))
}
|