How to use the Socket function from bindings
Find comprehensive JavaScript bindings.Socket code examples handpicked from public code repositorys.
GitHub: awesome-archive/kungfu

98 99 100 101 102 103 104 105 106
default: throw new Error('unrecognised socket type ' + type); break; } this.binding = nn.Socket(this.af_domain, this.protocol); this.bound = {}; this.connected = {}; this.queue = [];
+ 33 other calls in file
GitHub: reqshark/nanomsg.iojs

49 50 51 52 53 54 55 56 57 58
if(typeof opts == 'string') opts = { fam: opts } opts = opts || { fam: 'af' } if(!opts.hasOwnProperty('fam')) opts.fam = 'af' //ensure first nanomsg socket is not zero, else disregard it var nns = nn.Socket(af[opts.fam], sock[type][0]) if(nns == 0) return new self(nn.Socket(af[opts.fam],sock[type][0]), type, opts) return new self( nns, type, opts ) } }
+ 21 other calls in file
GitHub: marchon/nanomsg.iojs

58 59 60 61 62 63 64 65 66 67
//preflight check if(typeof opts == 'string') opts = { fam: opts } opts = opts || { fam: 'af' } if(!opts.hasOwnProperty('fam')) opts.fam = 'af' return new self( nn.Socket(af[opts.fam],sock[type]), type, opts) } } function self (s, t, o) {
+ 19 other calls in file
bindings.createKey is the most popular function in bindings (8616 examples)