novastone-media / MQTT-Client-Framework

iOS, macOS, tvOS native ObjectiveC MQTT Client Framework
Other
1.84k stars 464 forks source link

MQTT3.1.1 #480

Closed NameOfSelf closed 5 years ago

NameOfSelf commented 6 years ago

MQTTProtocolVersion311 Problem. I have connected to MQTT and subscribe to a topic successfully.something wrong with my message received callback, when I send a message (the server set a message call back, when I send a message to servers) This is my setting:dispatch_once(&token, ^{ client = [[YHMQTTClient alloc] init]; client.transport = [[MQTTCFSocketTransport alloc] init]; client.transport.host = MQTT_IP; client.transport.port = MQTT_PORT; client.session = [[MQTTSession alloc] init]; client.session.transport = client.transport; client.session.delegate = client; client.session.protocolLevel = MQTTProtocolVersion311; client.session.clientId = @"user/a075077c-6fc1-11e8-94ef-00163e0070dd"; and the parameters of Qos always is 2; when I recevied the callback ,this is "illegal header flags" show in my dashboard.

ckrey commented 6 years ago

Probably you are using a non-conforming MQTT broker!?

See #369 or #158

NameOfSelf commented 6 years ago

Today, I use your project MQTTChat as a Test for my servers. I replace the host and port and subcribe my own topic. But the same problem arise。

NameOfSelf commented 6 years ago

Probably, is it possible something wrong with servers?