Hi,
I've been porting my "pure" Common Lisp MQTT client to Picolisp, and it has 
gone very well for non-SSL connections (I just used "connect"), but I am 
looking for a canonical way to connect to a SSL/TLS encrypted socket (no certs 
needed, I just need basic encryption).

I've been using pipe and an external "helper" (ncat in this case but socat 
would be similar):

(de mq-open (Host Port SSL)
    (if SSL
        (pipe 
         (exec "ncat" "--ssl" Host Port))
      (connect Host Port)))

Is this a good approach?  Using the FFI to call openssl library is more 
efficient, but I didn't want to go that path yet...
Once concern I have with the above code is dealing with when a connection is 
dropped.

My MQTT implementation currently has no "outside" dependencies (with the above 
exception) and I'd like to keep it as independent as possible.

Am I missing an obviously better approach?

/todd

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to