byte array containing package content
{type: package type, buffer: body byte array}
Package protocol encode.
Pomelo package format: +------+-------------+------------------+ | type | body length | body | +------+-------------+------------------+
Head: 4bytes 0: package type, 1 - handshake, 2 - handshake ack, 3 - heartbeat, 4 - data 5 - kick 1 - 3: big-endian body length Body: body length bytes
package type
body content in bytes
new byte array that contains encode result
Package protocol decode. See encode for package format.