aciidgh / SwiftMQTT

MQTT Client in pure swift ❤️
MIT License
270 stars 71 forks source link

Read full message from InputStream. #20

Open mixalich7b opened 7 years ago

mixalich7b commented 7 years ago

Hello! Sometimes MQTT message doesn't fit one TCP packet. It can lead to problems in MQTTSessionDelegate or even to crash in runtime (when topic of MQTTPublishPacket is too large and divided to different TCP packets). In this PR I would like to fix it using a buffer to collect the complete message.