wangha

Results 17 comments of wangha

It is because that context switch needs time. I think lthread is not an out-of-the-box project. It must be changed before being applied. For example. The computed tasks and defer...

@TheReverberation 100 pthreads VS 100 lthreads? or more than 100 lthreads in 100 pthreads? Maybe you can show your code.

Thanks, and does msquic provide any elegant ways to do reconnect? (in callback or not)

Ok. Thanks. I will shutdown gracefully and try.

Hello @shu7734 我参考你的demo进行了测试,似乎并没有触发NanoMQ的任何问题。以下是我的编译命令与日志。 ``` make CFLAGS_EXTRA="-DMG_TLS=MG_TLS_MBED -lmbedtls -lmbedcrypto -lmbedx509" ./example 141eaf3 3 net.c:177:mg_connect 1 -1 wss://192.168.192.2:8086/mqtt 141eaf3 3 sock.c:388:mg_connect_resolve 1 4 -> 192.168.192.2:8086 pend 141eaf3 3 mqtt.c:326:mg_mqtt_pub 1 [devtype1/mqttx_0f8aaefa] ->...

> 没有连接成功请参考我文件前几行的注释代码,需要修改Mongoose的代码的,因为你们有两个特殊的MQTT header > > 具体版本我就不记得了,就是当天从master签出来的版本,目前为了进度已换成其它的MQTT Server 像这样吗? ``` s_mqttconn = mg_ws_connect(mgr, s_mqtt_url, fn, NULL, "Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits\r\n", "Sec-WebSocket-Protocol: mqtt\r\n"); ```

是的,还是无法连接。 不过好消息是,Mongoose官方的Demo可以运行。 以下是我的修改。 ``` --- a/examples/mqtt-over-ws-client/main.c +++ b/examples/mqtt-over-ws-client/main.c @@ -13,7 +13,7 @@ static const char *s_url = #if MG_TLS - "wss://broker.hivemq.com:8884/mqtt"; + "wss://192.168.192.2:8086/mqtt"; #else "ws://broker.hivemq.com:8000/mqtt"; #endif @@ -26,7 +26,7 @@...

@nvthong2303 What instructions? About compile or build?