diff options
author | Determinant <ted.sybil@gmail.com> | 2019-06-28 17:10:49 -0400 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2019-06-28 17:10:49 -0400 |
commit | 6d1be18d58a2e6874cddc59e0f01a14e153d1938 (patch) | |
tree | 40cc75352695cd5019538eabd1e818c0b7245244 /msg.go | |
parent | 1e27eb1b25c2998ede63fc7a138477e1ae4b9508 (diff) |
add MPSCQueue and more
Diffstat (limited to 'msg.go')
-rw-r--r-- | msg.go | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -43,3 +43,13 @@ func (self Msg) GetPayloadByMove() DataStream { func (self Msg) GetOpcode() Opcode { return Opcode(C.msg_get_opcode(self.inner)) } + +// Get the magic number. +func (self Msg) GetMagic() uint32 { + return uint32(C.msg_get_magic(self.inner)) +} + +// Set the magic number (the default value is 0x0). +func (self Msg) SetMagic(magic uint32) { + C.msg_set_magic(self.inner, C.uint32_t(magic)) +} |