aboutsummaryrefslogtreecommitdiff
path: root/test_msgnet
diff options
context:
space:
mode:
Diffstat (limited to 'test_msgnet')
-rw-r--r--test_msgnet/main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/test_msgnet/main.go b/test_msgnet/main.go
index 292fb8f..5b31c2c 100644
--- a/test_msgnet/main.go
+++ b/test_msgnet/main.go
@@ -23,12 +23,12 @@ const (
)
func msgHelloSerialize(name string, text string) salticidae.Msg {
- serialized := salticidae.NewDataStream()
+ serialized := salticidae.NewDataStream(true)
serialized.PutU32(salticidae.ToLittleEndianU32(uint32(len(name))))
serialized.PutData([]byte(name))
serialized.PutData([]byte(text))
return salticidae.NewMsgMovedFromByteArray(
- MSG_OPCODE_HELLO, salticidae.NewByteArrayMovedFromDataStream(serialized))
+ MSG_OPCODE_HELLO, salticidae.NewByteArrayMovedFromDataStream(serialized, true), true)
}
func msgHelloUnserialize(msg salticidae.Msg) (name string, text string) {
@@ -41,7 +41,7 @@ func msgHelloUnserialize(msg salticidae.Msg) (name string, text string) {
}
func msgAckSerialize() salticidae.Msg {
- return salticidae.NewMsgMovedFromByteArray(MSG_OPCODE_ACK, salticidae.NewByteArray())
+ return salticidae.NewMsgMovedFromByteArray(MSG_OPCODE_ACK, salticidae.NewByteArray(true), true)
}
func checkError(err *salticidae.Error) {