aboutsummaryrefslogtreecommitdiff
path: root/msg.go
diff options
context:
space:
mode:
Diffstat (limited to 'msg.go')
-rw-r--r--msg.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/msg.go b/msg.go
index d846399..c3c0811 100644
--- a/msg.go
+++ b/msg.go
@@ -6,14 +6,14 @@ 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 NewMsgMovedFromByteArray(opcode Opcode, _moved_payload ByteArray) Msg {
+ return C.msg_new_moved_from_bytearray(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) ConsumePayload() DataStream {
+ return C.msg_consume_payload(self)
}
func (self Msg) GetOpcode() Opcode {