37 lines
580 B
Plaintext
37 lines
580 B
Plaintext
Message := struct {
|
|
msg_type: u8,
|
|
key: String,
|
|
value: String,
|
|
}
|
|
|
|
/*
|
|
# Message Type
|
|
0 => Set Key type
|
|
1 => Get Key
|
|
*/
|
|
|
|
recv_msg:= fn(): Message {
|
|
return Message.{
|
|
msg_type: 0,
|
|
key: "",
|
|
value: "",
|
|
}
|
|
}
|
|
|
|
main := fn(): int {
|
|
loop {
|
|
msg := recv_msg();
|
|
if msg.msg_type == 0 {
|
|
continue;
|
|
}
|
|
if msg.msg_type == 1 {
|
|
continue;
|
|
}
|
|
if 2 <= msg.msg_type {
|
|
error("Unexpected message type in the bagging area");
|
|
continue;
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
} |