Did you take a look at: https://github.com/eclipse/paho.mqtt.golang https://github.com/eclipse/paho.golang
On Friday, September 17, 2021 at 12:17:14 AM UTC+3 yba...@gmail.com wrote: > Hello everyone, > > I am trying to design a new library to encode/decode MQTT messages. I > began the work, and now I must decide how to design the TCP processing of > my library, and I am facing two choices: > - Design in a non-blocking tcp way (that is let the user use > select()/poll()/epoll() sycall). > - Or design it with blocking tcp io inside go routines, which would return > 2 channels (read and write). Then let the user do a channel-select in its > main go routine. > > I fail to see which one is superior to the other. > Moreover: one is idiomatic go, but one the other hand I like the idea to > provide a thin wrapper and let the developper user of the library to choose > which way he handles his problematic. > > What would you do? > > Regards > Yves > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/15e495ff-1b12-40de-9fcd-257e7768a94fn%40googlegroups.com.