Search in sources :

Example 1 with MqttConnAckMessage

use of io.netty.handler.codec.mqtt.MqttConnAckMessage in project activemq-artemis by apache.

the class MQTTProtocolHandler method sendConnack.

void sendConnack(MqttConnectReturnCode returnCode) {
    MqttFixedHeader fixedHeader = new MqttFixedHeader(MqttMessageType.CONNACK, false, MqttQoS.AT_MOST_ONCE, false, 0);
    MqttConnAckVariableHeader varHeader = new MqttConnAckVariableHeader(returnCode, true);
    MqttConnAckMessage message = new MqttConnAckMessage(fixedHeader, varHeader);
    sendToClient(message);
}
Also used : MqttFixedHeader(io.netty.handler.codec.mqtt.MqttFixedHeader) MqttConnAckVariableHeader(io.netty.handler.codec.mqtt.MqttConnAckVariableHeader) MqttConnAckMessage(io.netty.handler.codec.mqtt.MqttConnAckMessage)

Aggregations

MqttConnAckMessage (io.netty.handler.codec.mqtt.MqttConnAckMessage)1 MqttConnAckVariableHeader (io.netty.handler.codec.mqtt.MqttConnAckVariableHeader)1 MqttFixedHeader (io.netty.handler.codec.mqtt.MqttFixedHeader)1