DotNetty.Codecs.Mqtt This is the main encoding method. It's only visible for testing. @param bufferAllocator Allocates ByteBuf @param packet MQTT packet to encode @return ByteBuf with encoded bytes