emqx / CocoaMQTT

MQTT 5.0 client library for iOS and macOS written in Swift
https://www.emqx.com/en
Other
1.57k stars 411 forks source link

publish message with 15MB of image Base64String failed. #572

Open wangqiwei66 opened 5 months ago

wangqiwei66 commented 5 months ago

I'm trying to publish a message with a base64String of image ,string length about 15MB. I can log didPublishMessage .but immediately received: [TRACE] [didDisconect]: Optional(Error Domain=MGCDAsyncSocketErrorDomain Code=5 “Write operation timed out” UserInfo={NSLocalizedDescription=Write operation timed out}) Is there anyway to set the maxium payload limit in code ?

JaylinYu commented 5 months ago

Apparently a tcp timeout while writing big packet yo socket. The max packet size is set by Broker or in connect.