bitactor core
v1.0.4
Bitactor Core is a Java web service framework
General
| head | packetType |
|---|---|
| 2(short) | 1(byte) |
MessageData is exclusive
| head | packetType | protoType | msgId | commandId | data |
|---|---|---|---|---|---|
| 2(short) | 1(byte) | 1(byte) | 4(int) | 4(int) | n(byte) |
| Parameter name | noun | explain |
|---|---|---|
| head | Bound head | Specify the length of the enclosure, excluding the length of the head. |
| protoType | Package Type | Package Type Protocol Package Type. |
| protoType | Protocol Type | Specify the serialization type and support Protobuf/Json. |
| msgId | Message number | The message number of a single request response is the same. Each time the request message number is added +1, the msg of the push message is fixed to 0. |
| commandId | Protocol parsing id | The hashCode value of the simple class name of the serialization class, used for serialization & deserialization (can also be customized) |
| data | Data content | Protobuf/Json's serialization class byte[] |
PacketType protocol is divided into 5 types
| Package class name | packetType value | describe |
|---|---|---|
| MessageHandShake | 0x01 | Handshake message |
| MessageAck | 0x02 | Confirm message |
| MessageHeartBeat | 0x03 | Heartbeat message |
| MessageData | 0x04 | Data message |
| MessageClose | 0x10 | Close message |