- nn-socket protocol #!optional domainprocedure
Create a nanomsg socket. Protocol can be any of the symbols pair, pub, sub, pull, push, req, rep, surveyor, respondent or bus. Domain can be the symbol sp or sp-raw, and defaults to sp. The returned socket is automatically closed with nn-close when it is garbage-collected.