to listen to multiple ports in a single thread

82 views
Skip to first unread message

Suman Patro

unread,
Apr 2, 2016, 3:59:22 PM4/2/16
to MQTT
Hello, How does mosquitto listen to multiple ports (websockets and mqtt ) without blocking using libwebsockets library in a single thread? Or it uses multithreading for the same?If single threaded , then does libwebsockets  provide any ,mechanism or that is taken care at the mosquito's code level?
Please do answer.
Thanks and regards,
Suman

Laing, Michael

unread,
Apr 2, 2016, 4:55:27 PM4/2/16
to mq...@googlegroups.com
Hi Suman,

It is single threaded and listens for events using poll.

See loop.c in the src directory of the distribution.

Cheers,
Michael

--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at https://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages