~starkingdoms/starkingdoms

ref: bb92723517eb6968fc446dc1654ee6c27eceb751 starkingdoms/protocol/src/pbuf/message_c2s.proto -rw-r--r-- 845 bytes
bb927235 — c0repwn3r translate client to protobuf protocol 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
syntax = "proto3";
package protocol.message_c2s;

import "state.proto";
import "goodbye_reason.proto";

message MessageC2SHello {
  enum packet_info { unknown = 0; type = 0x01; }

  uint32 version = 1;             // Version of the protocol. Currently always 1
  string requested_username = 2;  // The username that the client is requesting.
  protocol.state.State next_state = 3;           // The state the connection will go into after the handshake.
}

message MessageC2SGoodbye {
  enum packet_info { unknown = 0; type = 0x02; }

  protocol.goodbye_reason.GoodbyeReason reason = 1; // The reason the client is disconnecting the server
}

message MessageC2SChat {
  enum packet_info { unknown = 0; type = 0x03; }

  string message = 1; // The chat message to sent
}

message MessageC2SPing {
  enum packet_info { unknown = 0; type = 0x04; }
}