withProtocolVersion method

MqttConnectMessage withProtocolVersion(
  1. int protocolVersion
)

Sets the protocol version.

Implementation

MqttConnectMessage withProtocolVersion(int protocolVersion) {
  variableHeader!.protocolVersion = protocolVersion;
  Protocol.version = protocolVersion;
  return this;
}