use of com.swiftmq.impl.mqtt.v311.netty.handler.codec.mqtt.MqttMessageType in project swiftmq-ce by iitsoftware.
the class PacketDecoder method getFixedHeaderSize.
private int getFixedHeaderSize(int messageType) {
int size;
MqttMessageType type = MqttMessageType.valueOf(messageType);
switch(type) {
case PINGREQ:
case PINGRESP:
case DISCONNECT:
case PUBACK:
case PUBCOMP:
case PUBREL:
case PUBREC:
case UNSUBACK:
size = 2;
break;
default:
size = MAX_FHEADERS_SIZE;
}
if (traceSpace.enabled)
trace("PacketDecoder/getFixedHeaderSize: messageType=" + messageType);
return size;
}
Aggregations