diff --git a/assets/hierarchy.js b/assets/hierarchy.js new file mode 100644 index 00000000..bac6ee43 --- /dev/null +++ b/assets/hierarchy.js @@ -0,0 +1 @@ +window.hierarchyData="eJydlFFPgzAUhf9Ln6uuLbCyZ3120QeXmD0U6EKzDrQtS8yy/247ZHaKpfOFEHr47uFy7j0A1bZGg8UrnkOUQExoBskaAsU3kpdGtI09PADiLg3bcbAAL0oYVkgOINiKpgILnGYQdEraM9EYrjas5PpukN3WZiettpRMWxYwurpx792cte6wFrJSvLFGEueCwGyWQjrDMM8JRIhSiNLMWpwn9i5PcogRoesjBCjxrD1xVkVYG2T/sJYgOmKNuMsva3juWXvY88Y8d4UulSi4mnD4Q32tUZzOTg4SvzlLJr7LIkyHsieorenO/yzUP3AfRfwsLLtCCl3zMHgQTdNtez36SLtG8BFtOvPtr7uIy3vHtQnBvyTTZBuIC/Kb/AhzrWCaaiPmUe85k+Fe9Ipproutb7ftTBjcKyLA5AK87KQMR0PKCKgd/QuorsNQXUdA7bx60FVUlFdXZNntAr9AXJpX18TZbRp/XozibBeclZMiZspp5oPbcsuDc9IrJsBjez6wUMcXvtttnrXHQnO1D/d00Ex99/H4Ce92Nbs="; \ No newline at end of file diff --git a/assets/icons.js b/assets/icons.js index 006f19c2..5439abdb 100644 --- a/assets/icons.js +++ b/assets/icons.js @@ -1 +1 @@ -!function t(){if("loading"===document.readyState)return document.addEventListener("DOMContentLoaded",t);const r=document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg","svg"));r.innerHTML='""',r.style.display="none","file:"===location.protocol&&document.querySelectorAll("use").forEach((t=>{t.getAttribute("href").includes("#icon-")&&t.setAttribute("href",t.getAttribute("href").replace(/.*#/,"#"))}))}(); \ No newline at end of file +!function t(){if("loading"===document.readyState)return document.addEventListener("DOMContentLoaded",t);const e=document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg","svg"));e.innerHTML='MMNEPVFCICPMFPCPTTAAATR',e.style.display="none","file:"===location.protocol&&document.querySelectorAll("use").forEach((t=>{t.getAttribute("href").includes("#icon-")&&t.setAttribute("href",t.getAttribute("href").replace(/.*#/,"#"))}))}(); \ No newline at end of file diff --git a/assets/icons.svg b/assets/icons.svg index e371b8b5..50ad5799 100644 --- a/assets/icons.svg +++ b/assets/icons.svg @@ -1 +1 @@ - \ No newline at end of file +MMNEPVFCICPMFPCPTTAAATR \ No newline at end of file diff --git a/assets/main.js b/assets/main.js index ebbc9bb4..f5d8ce9f 100644 --- a/assets/main.js +++ b/assets/main.js @@ -1,4 +1,4 @@ -"use strict";window.translations={copy:"Copy",copied:"Copied!",normally_hidden:"This member is normally hidden due to your filter settings."},(()=>{var e,t,r=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,l=(e=(e,t)=>{!function(){var r,n=function(e){var t=new n.Builder;return t.pipeline.add(n.trimmer,n.stopWordFilter,n.stemmer),t.searchPipeline.add(n.stemmer),e.call(t,t),t.build()};n.version="2.3.9",n.utils={},n.utils.warn=(r=this,function(e){r.console&&console.warn&&console.warn(e)}),n.utils.asString=function(e){return null==e?"":e.toString()},n.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),n=0;n0){var u=n.utils.clone(t)||{};u.position=[a,l],u.index=s.length,s.push(new n.Token(r.slice(a,o),u))}a=o+1}}return s},n.tokenizer.separator=/[\s\-]+/,n.Pipeline=function(){this._stack=[]},n.Pipeline.registeredFunctions=Object.create(null),n.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&n.utils.warn("Overwriting existing registered function: "+t),e.label=t,n.Pipeline.registeredFunctions[e.label]=e},n.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||n.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},n.Pipeline.load=function(e){var t=new n.Pipeline;return e.forEach((function(e){var r=n.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)})),t},n.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){n.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},n.Pipeline.prototype.after=function(e,t){n.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},n.Pipeline.prototype.before=function(e,t){n.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},n.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},n.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=i),s!=e);)n=r-t,i=t+Math.floor(n/2),s=this.elements[2*i];return s==e||s>e?2*i:sa?u+=2:o==a&&(t+=r[l+1]*n[u+1],l+=2,u+=2);return t},n.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},n.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new n.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o.final=!0),i.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var l=s.node.edges["*"];else l=new n.TokenSet,s.node.edges["*"]=l;if(0==s.str.length&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else u=new n.TokenSet,s.node.edges["*"]=u;1==s.str.length&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,d=s.str.charAt(0),h=s.str.charAt(1);h in s.node.edges?c=s.node.edges[h]:(c=new n.TokenSet,s.node.edges[h]=c),1==s.str.length&&(c.final=!0),i.push({node:c,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},n.TokenSet.fromString=function(e){for(var t=new n.TokenSet,r=t,i=0,s=e.length;i=e;t--){var r=this.uncheckedNodes[t],n=r.child.toString();n in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[n]:(r.child._str=n,this.minimizedNodes[n]=r.child),this.uncheckedNodes.pop()}},n.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},n.Index.prototype.search=function(e){return this.query((function(t){new n.QueryParser(e,t).parse()}))},n.Index.prototype.query=function(e){for(var t=new n.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?1:e},n.Builder.prototype.k1=function(e){this._k1=e},n.Builder.prototype.add=function(e,t){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var s=0;s=this.length)return n.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},n.QueryLexer.prototype.width=function(){return this.pos-this.start},n.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},n.QueryLexer.prototype.backup=function(){this.pos-=1},n.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=n.QueryLexer.EOS&&this.backup()},n.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(n.QueryLexer.TERM)),e.ignore(),e.more())return n.QueryLexer.lexText},n.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(n.QueryLexer.EDIT_DISTANCE),n.QueryLexer.lexText},n.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(n.QueryLexer.BOOST),n.QueryLexer.lexText},n.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(n.QueryLexer.TERM)},n.QueryLexer.termSeparator=n.tokenizer.separator,n.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==n.QueryLexer.EOS)return n.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return n.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(n.QueryLexer.TERM),n.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(n.QueryLexer.TERM),n.QueryLexer.lexBoost;if("+"==t&&1===e.width()||"-"==t&&1===e.width())return e.emit(n.QueryLexer.PRESENCE),n.QueryLexer.lexText;if(t.match(n.QueryLexer.termSeparator))return n.QueryLexer.lexTerm}else e.escapeCharacter()}},n.QueryParser=function(e,t){this.lexer=new n.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},n.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=n.QueryParser.parseClause;e;)e=e(this);return this.query},n.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},n.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},n.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},n.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case n.QueryLexer.PRESENCE:return n.QueryParser.parsePresence;case n.QueryLexer.FIELD:return n.QueryParser.parseField;case n.QueryLexer.TERM:return n.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value '"+t.str+"'"),new n.QueryParseError(r,t.start,t.end)}},n.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=n.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=n.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+t.str+"'";throw new n.QueryParseError(r,t.start,t.end)}var i=e.peekLexeme();if(null==i)throw r="expecting term or field, found nothing",new n.QueryParseError(r,t.start,t.end);switch(i.type){case n.QueryLexer.FIELD:return n.QueryParser.parseField;case n.QueryLexer.TERM:return n.QueryParser.parseTerm;default:throw r="expecting term or field, found '"+i.type+"'",new n.QueryParseError(r,i.start,i.end)}}},n.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),i="unrecognised field '"+t.str+"', possible fields: "+r;throw new n.QueryParseError(i,t.start,t.end)}e.currentClause.fields=[t.str];var s=e.peekLexeme();if(null==s)throw i="expecting term, found nothing",new n.QueryParseError(i,t.start,t.end);if(s.type===n.QueryLexer.TERM)return n.QueryParser.parseTerm;throw i="expecting term, found '"+s.type+"'",new n.QueryParseError(i,s.start,s.end)}},n.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(null==r)return void e.nextClause();switch(r.type){case n.QueryLexer.TERM:return e.nextClause(),n.QueryParser.parseTerm;case n.QueryLexer.FIELD:return e.nextClause(),n.QueryParser.parseField;case n.QueryLexer.EDIT_DISTANCE:return n.QueryParser.parseEditDistance;case n.QueryLexer.BOOST:return n.QueryParser.parseBoost;case n.QueryLexer.PRESENCE:return e.nextClause(),n.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new n.QueryParseError(i,r.start,r.end)}}},n.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new n.QueryParseError(i,t.start,t.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(null==s)return void e.nextClause();switch(s.type){case n.QueryLexer.TERM:return e.nextClause(),n.QueryParser.parseTerm;case n.QueryLexer.FIELD:return e.nextClause(),n.QueryParser.parseField;case n.QueryLexer.EDIT_DISTANCE:return n.QueryParser.parseEditDistance;case n.QueryLexer.BOOST:return n.QueryParser.parseBoost;case n.QueryLexer.PRESENCE:return e.nextClause(),n.QueryParser.parsePresence;default:throw i="Unexpected lexeme type '"+s.type+"'",new n.QueryParseError(i,s.start,s.end)}}},n.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var i="boost must be numeric";throw new n.QueryParseError(i,t.start,t.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(null==s)return void e.nextClause();switch(s.type){case n.QueryLexer.TERM:return e.nextClause(),n.QueryParser.parseTerm;case n.QueryLexer.FIELD:return e.nextClause(),n.QueryParser.parseField;case n.QueryLexer.EDIT_DISTANCE:return n.QueryParser.parseEditDistance;case n.QueryLexer.BOOST:return n.QueryParser.parseBoost;case n.QueryLexer.PRESENCE:return e.nextClause(),n.QueryParser.parsePresence;default:throw i="Unexpected lexeme type '"+s.type+"'",new n.QueryParseError(i,s.start,s.end)}}},function(r,n){"function"==typeof define&&define.amd?define(n):"object"==typeof e?t.exports=n():r.lunr=n()}(this,(function(){return n}))}()},()=>(t||e((t={exports:{}}).exports,t),t.exports)),u=[];function c(e,t){u.push({selector:t,constructor:e})}var d=((e,t,l)=>(l=null!=e?r(o(e)):{},((e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of s(t))!a.call(e,l)&&l!==r&&n(e,l,{get:()=>t[l],enumerable:!(o=i(t,l))||o.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e)))(l());async function h(e,t){if(!window.searchData)return;let r=await fetch(window.searchData),n=new Blob([await r.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(n).json();e.data=i,e.index=d.Index.load(i.index),t.classList.remove("loading"),t.classList.add("ready")}function p(e){e.classList.remove("has-focus")}function f(e,t,r){let n=e.querySelector(".current");if(n){let e=n;if(1===r)do{e=e.nextElementSibling??void 0}while(e instanceof HTMLElement&&null==e.offsetParent);else do{e=e.previousElementSibling??void 0}while(e instanceof HTMLElement&&null==e.offsetParent);e?(n.classList.remove("current"),e.classList.add("current")):-1===r&&(n.classList.remove("current"),t.focus())}else n=e.querySelector(1==r?"li:first-child":"li:last-child"),n&&n.classList.add("current")}function m(e,t){if(""===t)return e;let r=e.toLocaleLowerCase(),n=t.toLocaleLowerCase(),i=[],s=0,o=r.indexOf(n);for(;-1!=o;)i.push(g(e.substring(s,o)),`${g(e.substring(o,o+n.length))}`),s=o+n.length,o=r.indexOf(n,s);return i.push(g(e.substring(s))),i.join("")}var y={"&":"&","<":"<",">":">","'":"'",'"':"""};function g(e){return e.replace(/[&<>"'"]/g,(e=>y[e]))}var v=class{constructor(e){this.el=e.el,this.app=e.app}},x="mousedown",w="mousemove",E="mouseup",b={x:0,y:0},L=!1,k=!1,S=!1,Q=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(Q?"is-mobile":"not-mobile"),Q&&"ontouchstart"in document.documentElement&&(x="touchstart",w="touchmove",E="touchend"),document.addEventListener(x,(e=>{k=!0,S=!1;let t="touchstart"==x?e.targetTouches[0]:e;b.y=t.pageY||0,b.x=t.pageX||0})),document.addEventListener(w,(e=>{if(k&&!S){let t="touchstart"==x?e.targetTouches[0]:e,r=b.x-(t.pageX||0),n=b.y-(t.pageY||0);S=Math.sqrt(r*r+n*n)>10}})),document.addEventListener(E,(()=>{k=!1})),document.addEventListener("click",(e=>{L&&(e.preventDefault(),e.stopImmediatePropagation(),L=!1)}));var T;try{T=localStorage}catch{T={getItem:()=>null,setItem(){}}}var P=T,I=document.head.appendChild(document.createElement("style"));I.dataset.for="filters";var O;function C(e){document.documentElement.dataset.theme=e}async function R(){let e=document.getElementById("tsd-nav-container");if(!e||!window.navigationData)return;let t=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([t]).stream().pipeThrough(new DecompressionStream("gzip")),n=await new Response(r).json();(O=e.dataset.base).endsWith("/")||(O+="/"),e.innerHTML="";for(let t of n)F(t,e,[]);window.app.createComponents(e),window.app.showPage(),window.app.ensureActivePageVisible()}function F(e,t,r){let n=t.appendChild(document.createElement("li"));if(e.children){let t=[...r,e.text],i=n.appendChild(document.createElement("details"));i.className=e.class?`${e.class} tsd-accordion`:"tsd-accordion";let s=i.appendChild(document.createElement("summary"));s.className="tsd-accordion-summary",s.dataset.key=t.join("$"),s.innerHTML='',D(e,s);let o=i.appendChild(document.createElement("div"));o.className="tsd-accordion-details";let a=o.appendChild(document.createElement("ul"));a.className="tsd-nested-navigation";for(let r of e.children)F(r,a,t)}else D(e,n,e.class)}function D(e,t,r){if(e.path){let n=t.appendChild(document.createElement("a"));n.href=O+e.path,r&&(n.className=r),location.pathname===n.pathname&&!n.href.includes("#")&&n.classList.add("current"),e.kind&&(n.innerHTML=``),n.appendChild(document.createElement("span")).textContent=e.text}else t.appendChild(document.createElement("span")).textContent=e.text}c(class extends v{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(E,(e=>this.onPointerUp(e))),this.el.addEventListener("click",(e=>e.preventDefault())),document.addEventListener(x,(e=>this.onDocumentPointerDown(e))),document.addEventListener(E,(e=>this.onDocumentPointerUp(e)))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let t=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(t),setTimeout((()=>document.documentElement.classList.remove(t)),500)}onPointerUp(e){S||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!S&&this.active&&e.target.closest(".col-sidebar")){let t=e.target.closest("a");if(t){let e=window.location.href;-1!=e.indexOf("#")&&(e=e.substring(0,e.indexOf("#"))),t.href.substring(0,e.length)==e&&setTimeout((()=>this.setActive(!1)),250)}}}},"a[data-toggle]"),c(class extends v{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let t=P.getItem(this.key);this.el.open=t?"true"===t:this.el.open,this.el.addEventListener("toggle",(()=>this.update()));let r=this.summary.querySelector("a");r&&r.addEventListener("click",(()=>{location.assign(r.href)})),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,P.setItem(this.key,this.el.open.toString())}},".tsd-accordion"),c(class extends v{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",(()=>{this.setLocalStorage(this.el.checked)})),this.setLocalStorage(this.fromLocalStorage()),I.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; }\n`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=P.getItem(this.key);return e?"true"===e:this.el.checked}setLocalStorage(e){P.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}},".tsd-filter-item input[type=checkbox]");var N=document.getElementById("tsd-theme");N&&function(e){let t=P.getItem("tsd-theme")||"os";e.value=t,C(t),e.addEventListener("change",(()=>{P.setItem("tsd-theme",e.value),C(e.value)}))}(N);var j=new class{constructor(){this.alwaysVisibleMember=null,this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",(()=>this.ensureFocusedElementVisible())),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){u.forEach((t=>{e.querySelectorAll(t.selector).forEach((e=>{e.dataset.hasInstance||(new t.constructor({el:e,app:this}),e.dataset.hasInstance=String(!0))}))}))}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),t=e?.parentElement;for(;t&&!t.classList.contains(".tsd-navigation");)t instanceof HTMLDetailsElement&&(t.open=!0),t=t.parentElement;if(e&&!function(e){let t=e.getBoundingClientRect(),r=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-r>=0)}(e)){let t=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=t,document.querySelector(".col-sidebar").scrollTop=t}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),t=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach((e=>{e.style.display="block";let t=Array.from(e.querySelectorAll(".tsd-index-link")).every((e=>null==e.offsetParent));e.style.display=t?"none":"block"})),e&&(e.open=t)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let t=e.parentElement;for(;t&&"SECTION"!==t.tagName;)t=t.parentElement;if(!t)return;let r=null==t.offsetParent,n=t;for(;n!==document.body;)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(null==t.offsetParent){this.alwaysVisibleMember=t,t.classList.add("always-visible");let e=document.createElement("p");e.classList.add("warning"),e.textContent=window.translations.normally_hidden,t.prepend(e)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach((e=>{let t;e.addEventListener("click",(()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(t),t=setTimeout((()=>{e.classList.remove("visible"),t=setTimeout((()=>{e.textContent=window.translations.copy}),100)}),1e3)}))}))}};Object.defineProperty(window,"app",{value:j}),function(){let e=document.getElementById("tsd-search");if(!e)return;let t={base:e.dataset.base+"/"},r=document.getElementById("tsd-search-script");e.classList.add("loading"),r&&(r.addEventListener("error",(()=>{e.classList.remove("loading"),e.classList.add("failure")})),r.addEventListener("load",(()=>{h(t,e)})),h(t,e));let n=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!n||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",(()=>{p(e)})),n.addEventListener("focus",(()=>e.classList.add("has-focus"))),function(e,t,r,n){r.addEventListener("input",((e,t=100)=>{let r;return()=>{clearTimeout(r),r=setTimeout((()=>e()),t)}})((()=>{!function(e,t,r,n){if(!n.index||!n.data)return;t.textContent="";let i,s=r.value.trim();if(s){let e=s.split(" ").map((e=>e.length?`*${e}*`:"")).join(" ");i=n.index.search(e)}else i=[];for(let e=0;et.score-e.score));for(let e=0,r=Math.min(10,i.length);e`,a=m(r.name,s);globalThis.DEBUG_SEARCH_WEIGHTS&&(a+=` (score: ${i[e].score.toFixed(2)})`),r.parent&&(a=`\n ${m(r.parent,s)}.${a}`);let l=document.createElement("li");l.classList.value=r.classes??"";let u=document.createElement("a");u.href=n.base+r.url,u.innerHTML=o+a,l.append(u),u.addEventListener("focus",(()=>{t.querySelector(".current")?.classList.remove("current"),l.classList.add("current")})),t.appendChild(l)}}(0,t,r,n)}),200)),r.addEventListener("keydown",(n=>{"Enter"==n.key?function(e,t){let r=e.querySelector(".current");if(r||(r=e.querySelector("li:first-child")),r){let e=r.querySelector("a");e&&(window.location.href=e.href),p(t)}}(t,e):"ArrowUp"==n.key?(f(t,r,-1),n.preventDefault()):"ArrowDown"===n.key&&(f(t,r,1),n.preventDefault())})),document.body.addEventListener("keypress",(e=>{e.altKey||e.ctrlKey||e.metaKey||!r.matches(":focus")&&"/"===e.key&&(e.preventDefault(),r.focus())})),document.body.addEventListener("keyup",(n=>{e.classList.contains("has-focus")&&("Escape"===n.key||!t.matches(":focus-within")&&!r.matches(":focus"))&&(r.blur(),p(e))}))}(e,i,n,t)}(),function(){let e=document.getElementById("tsd-nav-script");e&&(e.addEventListener("load",R),R())}()})(); +"use strict";window.translations={copy:"Copy",copied:"Copied!",normally_hidden:"This member is normally hidden due to your filter settings.",hierarchy_expand:"Expand",hierarchy_collapse:"Collapse"},(()=>{var e,t,r=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,l=(e=(e,t)=>{!function(){var r,n=function(e){var t=new n.Builder;return t.pipeline.add(n.trimmer,n.stopWordFilter,n.stemmer),t.searchPipeline.add(n.stemmer),e.call(t,t),t.build()};n.version="2.3.9",n.utils={},n.utils.warn=(r=this,function(e){r.console&&console.warn&&console.warn(e)}),n.utils.asString=function(e){return null==e?"":e.toString()},n.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),n=0;n0){var c=n.utils.clone(t)||{};c.position=[a,l],c.index=s.length,s.push(new n.Token(r.slice(a,o),c))}a=o+1}}return s},n.tokenizer.separator=/[\s\-]+/,n.Pipeline=function(){this._stack=[]},n.Pipeline.registeredFunctions=Object.create(null),n.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&n.utils.warn("Overwriting existing registered function: "+t),e.label=t,n.Pipeline.registeredFunctions[e.label]=e},n.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||n.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},n.Pipeline.load=function(e){var t=new n.Pipeline;return e.forEach((function(e){var r=n.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)})),t},n.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){n.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},n.Pipeline.prototype.after=function(e,t){n.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},n.Pipeline.prototype.before=function(e,t){n.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},n.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},n.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=i),s!=e);)n=r-t,i=t+Math.floor(n/2),s=this.elements[2*i];return s==e||s>e?2*i:sa?c+=2:o==a&&(t+=r[l+1]*n[c+1],l+=2,c+=2);return t},n.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},n.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new n.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o.final=!0),i.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var l=s.node.edges["*"];else l=new n.TokenSet,s.node.edges["*"]=l;if(0==s.str.length&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var c=s.node.edges["*"];else c=new n.TokenSet,s.node.edges["*"]=c;1==s.str.length&&(c.final=!0),i.push({node:c,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var u,d=s.str.charAt(0),h=s.str.charAt(1);h in s.node.edges?u=s.node.edges[h]:(u=new n.TokenSet,s.node.edges[h]=u),1==s.str.length&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},n.TokenSet.fromString=function(e){for(var t=new n.TokenSet,r=t,i=0,s=e.length;i=e;t--){var r=this.uncheckedNodes[t],n=r.child.toString();n in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[n]:(r.child._str=n,this.minimizedNodes[n]=r.child),this.uncheckedNodes.pop()}},n.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},n.Index.prototype.search=function(e){return this.query((function(t){new n.QueryParser(e,t).parse()}))},n.Index.prototype.query=function(e){for(var t=new n.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?1:e},n.Builder.prototype.k1=function(e){this._k1=e},n.Builder.prototype.add=function(e,t){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var s=0;s=this.length)return n.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},n.QueryLexer.prototype.width=function(){return this.pos-this.start},n.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},n.QueryLexer.prototype.backup=function(){this.pos-=1},n.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=n.QueryLexer.EOS&&this.backup()},n.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(n.QueryLexer.TERM)),e.ignore(),e.more())return n.QueryLexer.lexText},n.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(n.QueryLexer.EDIT_DISTANCE),n.QueryLexer.lexText},n.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(n.QueryLexer.BOOST),n.QueryLexer.lexText},n.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(n.QueryLexer.TERM)},n.QueryLexer.termSeparator=n.tokenizer.separator,n.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==n.QueryLexer.EOS)return n.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return n.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(n.QueryLexer.TERM),n.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(n.QueryLexer.TERM),n.QueryLexer.lexBoost;if("+"==t&&1===e.width()||"-"==t&&1===e.width())return e.emit(n.QueryLexer.PRESENCE),n.QueryLexer.lexText;if(t.match(n.QueryLexer.termSeparator))return n.QueryLexer.lexTerm}else e.escapeCharacter()}},n.QueryParser=function(e,t){this.lexer=new n.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},n.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=n.QueryParser.parseClause;e;)e=e(this);return this.query},n.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},n.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},n.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},n.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case n.QueryLexer.PRESENCE:return n.QueryParser.parsePresence;case n.QueryLexer.FIELD:return n.QueryParser.parseField;case n.QueryLexer.TERM:return n.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value '"+t.str+"'"),new n.QueryParseError(r,t.start,t.end)}},n.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=n.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=n.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+t.str+"'";throw new n.QueryParseError(r,t.start,t.end)}var i=e.peekLexeme();if(null==i)throw r="expecting term or field, found nothing",new n.QueryParseError(r,t.start,t.end);switch(i.type){case n.QueryLexer.FIELD:return n.QueryParser.parseField;case n.QueryLexer.TERM:return n.QueryParser.parseTerm;default:throw r="expecting term or field, found '"+i.type+"'",new n.QueryParseError(r,i.start,i.end)}}},n.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),i="unrecognised field '"+t.str+"', possible fields: "+r;throw new n.QueryParseError(i,t.start,t.end)}e.currentClause.fields=[t.str];var s=e.peekLexeme();if(null==s)throw i="expecting term, found nothing",new n.QueryParseError(i,t.start,t.end);if(s.type===n.QueryLexer.TERM)return n.QueryParser.parseTerm;throw i="expecting term, found '"+s.type+"'",new n.QueryParseError(i,s.start,s.end)}},n.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(null==r)return void e.nextClause();switch(r.type){case n.QueryLexer.TERM:return e.nextClause(),n.QueryParser.parseTerm;case n.QueryLexer.FIELD:return e.nextClause(),n.QueryParser.parseField;case n.QueryLexer.EDIT_DISTANCE:return n.QueryParser.parseEditDistance;case n.QueryLexer.BOOST:return n.QueryParser.parseBoost;case n.QueryLexer.PRESENCE:return e.nextClause(),n.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new n.QueryParseError(i,r.start,r.end)}}},n.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new n.QueryParseError(i,t.start,t.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(null==s)return void e.nextClause();switch(s.type){case n.QueryLexer.TERM:return e.nextClause(),n.QueryParser.parseTerm;case n.QueryLexer.FIELD:return e.nextClause(),n.QueryParser.parseField;case n.QueryLexer.EDIT_DISTANCE:return n.QueryParser.parseEditDistance;case n.QueryLexer.BOOST:return n.QueryParser.parseBoost;case n.QueryLexer.PRESENCE:return e.nextClause(),n.QueryParser.parsePresence;default:throw i="Unexpected lexeme type '"+s.type+"'",new n.QueryParseError(i,s.start,s.end)}}},n.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var i="boost must be numeric";throw new n.QueryParseError(i,t.start,t.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(null==s)return void e.nextClause();switch(s.type){case n.QueryLexer.TERM:return e.nextClause(),n.QueryParser.parseTerm;case n.QueryLexer.FIELD:return e.nextClause(),n.QueryParser.parseField;case n.QueryLexer.EDIT_DISTANCE:return n.QueryParser.parseEditDistance;case n.QueryLexer.BOOST:return n.QueryParser.parseBoost;case n.QueryLexer.PRESENCE:return e.nextClause(),n.QueryParser.parsePresence;default:throw i="Unexpected lexeme type '"+s.type+"'",new n.QueryParseError(i,s.start,s.end)}}},function(r,n){"function"==typeof define&&define.amd?define(n):"object"==typeof e?t.exports=n():r.lunr=n()}(this,(function(){return n}))}()},()=>(t||e((t={exports:{}}).exports,t),t.exports));window.translations||={copy:"Copy",copied:"Copied!",normally_hidden:"This member is normally hidden due to your filter settings.",hierarchy_expand:"Expand",hierarchy_collapse:"Collapse"};var c=[];function u(e,t){c.push({selector:t,constructor:e})}var d=((e,t,l)=>(l=null!=e?r(o(e)):{},((e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of s(t))!a.call(e,l)&&l!==r&&n(e,l,{get:()=>t[l],enumerable:!(o=i(t,l))||o.enumerable});return e})(!t&&e&&e.__esModule?l:n(l,"default",{value:e,enumerable:!0}),e)))(l(),1);async function h(e){let t=Uint8Array.from(atob(e),(e=>e.charCodeAt(0))),r=new Blob([t]).stream().pipeThrough(new DecompressionStream("deflate")),n=await new Response(r).text();return JSON.parse(n)}async function p(e,t){if(!window.searchData)return;let r=await h(window.searchData);e.data=r,e.index=d.Index.load(r.index),t.classList.remove("loading"),t.classList.add("ready")}function f(e){e.classList.remove("has-focus")}function m(e,t,r){let n=e.querySelector(".current");if(n){let e=n;if(1===r)do{e=e.nextElementSibling??void 0}while(e instanceof HTMLElement&&null==e.offsetParent);else do{e=e.previousElementSibling??void 0}while(e instanceof HTMLElement&&null==e.offsetParent);e?(n.classList.remove("current"),e.classList.add("current")):-1===r&&(n.classList.remove("current"),t.focus())}else n=e.querySelector(1==r?"li:first-child":"li:last-child"),n&&n.classList.add("current")}function y(e,t){if(""===t)return e;let r=e.toLocaleLowerCase(),n=t.toLocaleLowerCase(),i=[],s=0,o=r.indexOf(n);for(;-1!=o;)i.push(v(e.substring(s,o)),`${v(e.substring(o,o+n.length))}`),s=o+n.length,o=r.indexOf(n,s);return i.push(v(e.substring(s))),i.join("")}var g={"&":"&","<":"<",">":">","'":"'",'"':"""};function v(e){return e.replace(/[&<>"'"]/g,(e=>g[e]))}var x=class{el;app;constructor(e){this.el=e.el,this.app=e.app}},w="mousedown",E="mousemove",b="mouseup",L={x:0,y:0},S=!1,k=!1,Q=!1,T=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(T?"is-mobile":"not-mobile"),T&&"ontouchstart"in document.documentElement&&(w="touchstart",E="touchmove",b="touchend"),document.addEventListener(w,(e=>{k=!0,Q=!1;let t="touchstart"==w?e.targetTouches[0]:e;L.y=t.pageY||0,L.x=t.pageX||0})),document.addEventListener(E,(e=>{if(k&&!Q){let t="touchstart"==w?e.targetTouches[0]:e,r=L.x-(t.pageX||0),n=L.y-(t.pageY||0);Q=Math.sqrt(r*r+n*n)>10}})),document.addEventListener(b,(()=>{k=!1})),document.addEventListener("click",(e=>{S&&(e.preventDefault(),e.stopImmediatePropagation(),S=!1)}));var P;try{P=localStorage}catch{P={getItem:()=>null,setItem(){}}}var C=P,I=document.head.appendChild(document.createElement("style"));I.dataset.for="filters";var O,N=new Map,R=class{open;accordions=[];key;constructor(e,t){this.key=e,this.open=t}add(e){this.accordions.push(e),e.open=this.open,e.addEventListener("toggle",(()=>{this.toggle(e.open)}))}toggle(e){for(let t of this.accordions)t.open=e;C.setItem(this.key,e.toString())}};function F(e){document.documentElement.dataset.theme=e}async function D(){let e=document.getElementById("tsd-nav-container");if(!e||!window.navigationData)return;let t=await h(window.navigationData);(O=document.documentElement.dataset.base).endsWith("/")||(O+="/"),e.innerHTML="";for(let r of t)j(r,e,[]);window.app.createComponents(e),window.app.showPage(),window.app.ensureActivePageVisible()}function j(e,t,r){let n=t.appendChild(document.createElement("li"));if(e.children){let t=[...r,e.text],i=n.appendChild(document.createElement("details"));i.className=e.class?`${e.class} tsd-accordion`:"tsd-accordion";let s=i.appendChild(document.createElement("summary"));s.className="tsd-accordion-summary",s.dataset.key=t.join("$"),s.innerHTML='',A(e,s);let o=i.appendChild(document.createElement("div"));o.className="tsd-accordion-details";let a=o.appendChild(document.createElement("ul"));a.className="tsd-nested-navigation";for(let r of e.children)j(r,a,t)}else A(e,n,e.class)}function A(e,t,r){if(e.path){let n=t.appendChild(document.createElement("a"));n.href=O+e.path,r&&(n.className=r),location.pathname===n.pathname&&!n.href.includes("#")&&n.classList.add("current"),e.kind&&(n.innerHTML=``),n.appendChild(document.createElement("span")).textContent=e.text}else{let r=t.appendChild(document.createElement("span"));r.innerHTML='',r.appendChild(document.createElement("span")).textContent=e.text}}var B=document.documentElement.dataset.base;async function V(){let e=document.querySelector(".tsd-panel.tsd-hierarchy:has(h4 a)");if(!e||!window.hierarchyData)return;let t=+e.dataset.refl,r=await h(window.hierarchyData),n=e.querySelector("ul"),i=document.createElement("ul");if(i.classList.add("tsd-hierarchy"),function(e,t,r){let n=t.roots.filter((e=>function(e,t,r){if(t===r)return!0;let n=new Set,i=[e.reflections[t]];for(;i.length;){let t=i.pop();if(!n.has(t)){n.add(t);for(let n of t.children||[]){if(n===r)return!0;i.push(e.reflections[n])}}}return!1}(t,e,r)));for(let i of n)e.appendChild(q(t,i,r))}(i,r,t),n.querySelectorAll("li").length==i.querySelectorAll("li").length)return;let s=document.createElement("span");s.classList.add("tsd-hierarchy-toggle"),s.textContent=window.translations.hierarchy_expand,e.querySelector("h4 a")?.insertAdjacentElement("afterend",s),s.insertAdjacentText("beforebegin",", "),s.addEventListener("click",(()=>{s.textContent===window.translations.hierarchy_expand?(n.insertAdjacentElement("afterend",i),n.remove(),s.textContent=window.translations.hierarchy_collapse):(i.insertAdjacentElement("afterend",n),i.remove(),s.textContent=window.translations.hierarchy_expand)}))}function q(e,t,r,n=new Set){if(n.has(t))return;n.add(t);let i=e.reflections[t],s=document.createElement("li");if(s.classList.add("tsd-hierarchy-item"),t===r){let e=s.appendChild(document.createElement("span"));e.textContent=i.name,e.classList.add("tsd-hierarchy-target")}else{for(let t of i.uniqueNameParents||[]){let r=e.reflections[t],n=s.appendChild(document.createElement("a"));n.textContent=r.name,n.href=B+r.url,n.className=r.class+" tsd-signature-type",s.append(document.createTextNode("."))}let r=s.appendChild(document.createElement("a"));r.textContent=e.reflections[t].name,r.href=B+i.url,r.className=i.class+" tsd-signature-type"}if(i.children){let t=s.appendChild(document.createElement("ul"));t.classList.add("tsd-hierarchy");for(let s of i.children){let i=q(e,s,r,n);i&&t.appendChild(i)}}return n.delete(t),s}function M(){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width","20"),e.setAttribute("height","20"),e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("fill","none"),e.innerHTML='',e}B.endsWith("/")||(B+="/"),u(class extends x{active;className;constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(b,(e=>this.onPointerUp(e))),this.el.addEventListener("click",(e=>e.preventDefault())),document.addEventListener(w,(e=>this.onDocumentPointerDown(e))),document.addEventListener(b,(e=>this.onDocumentPointerUp(e)))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let t=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(t),setTimeout((()=>document.documentElement.classList.remove(t)),500)}onPointerUp(e){Q||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!Q&&this.active&&e.target.closest(".col-sidebar")){let t=e.target.closest("a");if(t){let e=window.location.href;-1!=e.indexOf("#")&&(e=e.substring(0,e.indexOf("#"))),t.href.substring(0,e.length)==e&&setTimeout((()=>this.setActive(!1)),250)}}}},"a[data-toggle]"),u(class extends x{constructor(e){super(e);let t=this.el.querySelector("summary"),r=t.querySelector("a");r&&r.addEventListener("click",(()=>{location.assign(r.href)}));let n,i=`tsd-accordion-${t.dataset.key??t.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;if(N.has(i))n=N.get(i);else{let e=C.getItem(i),t=e?"true"===e:this.el.open;n=new R(i,t),N.set(i,n)}n.add(this.el)}},".tsd-accordion"),u(class extends x{key;value;constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",(()=>{this.setLocalStorage(this.el.checked)})),this.setLocalStorage(this.fromLocalStorage()),I.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; }\n`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=C.getItem(this.key);return e?"true"===e:this.el.checked}setLocalStorage(e){C.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}},".tsd-filter-item input[type=checkbox]");var z=document.getElementById("tsd-theme");z&&function(e){let t=C.getItem("tsd-theme")||"os";e.value=t,F(t),e.addEventListener("change",(()=>{C.setItem("tsd-theme",e.value),F(e.value)}))}(z);var H=new class{alwaysVisibleMember=null;constructor(){this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",(()=>this.ensureFocusedElementVisible())),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){c.forEach((t=>{e.querySelectorAll(t.selector).forEach((e=>{e.dataset.hasInstance||(new t.constructor({el:e,app:this}),e.dataset.hasInstance=String(!0))}))}))}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),t=e?.parentElement;for(;t&&!t.classList.contains(".tsd-navigation");)t instanceof HTMLDetailsElement&&(t.open=!0),t=t.parentElement;if(e&&!function(e){let t=e.getBoundingClientRect(),r=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-r>=0)}(e)){let t=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=t,document.querySelector(".col-sidebar").scrollTop=t}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),t=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach((e=>{e.style.display="block";let t=Array.from(e.querySelectorAll(".tsd-index-link")).every((e=>null==e.offsetParent));e.style.display=t?"none":"block"})),e&&(e.open=t)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let t=e.parentElement;for(;t&&"SECTION"!==t.tagName;)t=t.parentElement;if(!t)return;let r=null==t.offsetParent,n=t;for(;n!==document.body;)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(null==t.offsetParent){this.alwaysVisibleMember=t,t.classList.add("always-visible");let e=document.createElement("p");e.classList.add("warning"),e.textContent=window.translations.normally_hidden,t.prepend(e)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach((e=>{let t;e.addEventListener("click",(()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(t),t=setTimeout((()=>{e.classList.remove("visible"),t=setTimeout((()=>{e.textContent=window.translations.copy}),100)}),1e3)}))}))}};Object.defineProperty(window,"app",{value:H}),function(){let e=document.getElementById("tsd-search");if(!e)return;let t={base:document.documentElement.dataset.base+"/"},r=document.getElementById("tsd-search-script");e.classList.add("loading"),r&&(r.addEventListener("error",(()=>{e.classList.remove("loading"),e.classList.add("failure")})),r.addEventListener("load",(()=>{p(t,e)})),p(t,e));let n=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!n||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",(()=>{f(e)})),n.addEventListener("focus",(()=>e.classList.add("has-focus"))),function(e,t,r,n){r.addEventListener("input",((e,t=100)=>{let r;return()=>{clearTimeout(r),r=setTimeout((()=>e()),t)}})((()=>{!function(e,t,r,n){if(!n.index||!n.data)return;t.textContent="";let i,s=r.value.trim();if(s){let e=s.split(" ").map((e=>e.length?`*${e}*`:"")).join(" ");i=n.index.search(e)}else i=[];for(let e=0;et.score-e.score));for(let e=0,r=Math.min(10,i.length);e`,a=y(r.name,s);globalThis.DEBUG_SEARCH_WEIGHTS&&(a+=` (score: ${i[e].score.toFixed(2)})`),r.parent&&(a=`\n ${y(r.parent,s)}.${a}`);let l=document.createElement("li");l.classList.value=r.classes??"";let c=document.createElement("a");c.href=n.base+r.url,c.innerHTML=o+a,l.append(c),c.addEventListener("focus",(()=>{t.querySelector(".current")?.classList.remove("current"),l.classList.add("current")})),t.appendChild(l)}}(0,t,r,n)}),200)),r.addEventListener("keydown",(n=>{"Enter"==n.key?function(e,t){let r=e.querySelector(".current");if(r||(r=e.querySelector("li:first-child")),r){let e=r.querySelector("a");e&&(window.location.href=e.href),f(t)}}(t,e):"ArrowUp"==n.key?(m(t,r,-1),n.preventDefault()):"ArrowDown"===n.key&&(m(t,r,1),n.preventDefault())})),document.body.addEventListener("keypress",(e=>{e.altKey||e.ctrlKey||e.metaKey||!r.matches(":focus")&&"/"===e.key&&(e.preventDefault(),r.focus())})),document.body.addEventListener("keyup",(n=>{e.classList.contains("has-focus")&&("Escape"===n.key||!t.matches(":focus-within")&&!r.matches(":focus"))&&(r.blur(),f(e))}))}(e,i,n,t)}(),function(){let e=document.getElementById("tsd-nav-script");e&&(e.addEventListener("load",D),D())}(),document.querySelector(".tsd-full-hierarchy")?function(){document.addEventListener("click",(e=>{let t=e.target;for(;t.parentElement&&"LI"!=t.parentElement.tagName;)t=t.parentElement;t.dataset.dropdown&&(t.dataset.dropdown=String("true"!==t.dataset.dropdown))}));let e=new Map,t=new Set;for(let r of document.querySelectorAll(".tsd-full-hierarchy [data-refl]")){let n=r.querySelector("ul");e.has(r.dataset.refl)?t.add(r.dataset.refl):n&&e.set(r.dataset.refl,n)}for(let e of t)r(e);function r(t){let r=e.get(t).cloneNode(!0);r.querySelectorAll("[id]").forEach((e=>{e.removeAttribute("id")})),r.querySelectorAll("[data-dropdown]").forEach((e=>{e.dataset.dropdown="false"}));for(let e of document.querySelectorAll(`[data-refl="${t}"]`)){let t=M(),n=e.querySelector("ul");e.insertBefore(t,n),t.dataset.dropdown=String(!!n),n||e.appendChild(r.cloneNode(!0))}}}():document.querySelector(".tsd-hierarchy")&&function(){let e=document.getElementById("tsd-hierarchy-script");e&&(e.addEventListener("load",V),V())}()})(); /*! Bundled license information: lunr/lunr.js: diff --git a/assets/navigation.js b/assets/navigation.js index e0ab427f..12b76b2b 100644 --- a/assets/navigation.js +++ b/assets/navigation.js @@ -1 +1 @@ -window.navigationData="data:application/octet-stream;base64,H4sIAAAAAAAAA42VXU+DMBSG/0uvp7jppu52eqVmRk0kMV4UdibNuoJtISNm/91AYVvZ2Rl35Lx9np5+AF9/zMLGsimbpap+GrCM24RNWSy5MWCCJrhM7FqyAVsJtWDT4ehuO9ixD8Al6GPU1SlyHhnQBca2CUW/coGQVZWkdLopEawqk1weSWESrNldRPNSYqiUNGUSjDIJRb1BJpE11mWa+83BILegCUg2zS22Oa5Oke9pvAJkUlcnSauBrxGyrpNkHplYiwjreJ9RhpC4EGGvGxFSTYT9ungsQFnMI5QFveQxmKAzxteNxhPvAvAFjySgnjYkBfVpz1KlILbzzIpUGVyGDKTE7kh7iLGBlPhTC3tyyW1ICert3dO2zNo971BX97fD8ahLzpcfZQYo76JelpOOPoYXMIb/HPFNuSf9LFanDFV0zuJe9qODdR4vPGeKecYjIYU9+AIWXIvqHE2wT33Ptafo/g0PeBddDAm8AG1EqjC8iai5c13AE5T+322Zq7hefXCY+5rJzfb7H+cj+MfSBwAA"; \ No newline at end of file +window.navigationData="eJyNlU1PwkAQhv9LzyiCgspVPanBqIlNjIdtGeyGpa07WwIx/ne33RbYMgy9NfPu83T2o93P38DA2gST4C5Lq6dekAuT2EKsBCJgvw7OE7NUNl3IdBZMBsObv96WvQehQB+irs6R0whBryi2STj6RUiCLKsspbP1hsDKMssVkZKYUM1uI55XikKV4ilMKAoTjnqFXBFzrMo891MAEqegDlg2Kwy1OK7OkW9ZvADipa7OkkaDWBJkVWfJIsJYy4jqeJdxhpA5EGGnExFyTYTdunhYQWooj7SfrZ6L2KpaY3zdcDT2DoCYiUgB6WlCVlDttv1ppBCbaW5kliItIwZyYrelHcTUQE78oaU5OuUm5ATV8u5os8mbNW9RF7fXg9GwTU7n75YgeRd1shx1dDE8A6L4PuDrckf6SS6OGcrolMV97Acb6zxeeMoUi1xEUkmz9wdcCS3LfcT+LvU9l56ifRvu8S46GzC4vbfQdkrhdcS9u7D33iNs/NttXqRxNfv+fu5rxld/X/++B54b"; \ No newline at end of file diff --git a/assets/search.js b/assets/search.js index d3e76ab3..00940e8f 100644 --- a/assets/search.js +++ b/assets/search.js @@ -1 +1 @@ -window.searchData="data:application/octet-stream;base64,H4sIAAAAA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7Y5PPnSf4dlLEp2djNth4frQJXJCRH/MS754nCZ/v1GXqlUPuu/auGa8Ws5iVyGSr5t6wE86ZBBy+z3q+z4ZpwQC+DBLvnidBP0+C0DR3yH0V8u0BT8HmSL/zIe/n4/OHx5fVchZzs3Pneyw/X3Ql4Xqwi+l/p3Pi56/3p6tOdbEuCakqz+7N06s2PFWwPL9zPM/xfLcOPEGLfDFEFgcS755ZmSnT21mHt6LtdLHNsj89rLKf9cf0PM7VY/le7VgN8DxPCnyzjVw9kcX8xLtnPvgyPRse3lZicX1X8Fv2q9Rn94/ppTi+XC1PkxzfUj3fUQPPcyJfN3Ey5PLumY+8TGDz8Lbwjeu7f1xS19euyLM50fRgy8OF5RPvuOs891zgQTQyRok8iCbePfNgVSYt5PA2bHSSz78dv5w3OAJznZmv2ZQ6H63+dp5LSKo+Jzd805hG+NsffEuzfIdwTFU9n+PATz+RbxVpQsA8lcxcImV6b+2Q+i6gX6Anw8yRaup8KvxFeVd5/rJy7kzr3+6ePj5+vTstBrg092dwF/LziuV+cjyIeB6EAl/GgQehyDpT4t0z39DL5JA/vFnHOh0l56yPD58en++P6+Tzohf4kmAljG9ljmvac0kHvpVFFnsjP3om3j3zUZTJcnJ4Wxegh1v/9fvvnk5Px/NM8JzgX/76H//xfwDc8F69"; \ No newline at end of file diff --git a/assets/style.css b/assets/style.css index f1d7811e..6df176a5 100644 --- a/assets/style.css +++ b/assets/style.css @@ -1,9 +1,15 @@ -:root{--light-color-background:#f2f4f8;--light-color-background-secondary:#eff0f1;--light-color-warning-text:#222;--light-color-background-warning:#e6e600;--light-color-icon-background:var(--light-color-background);--light-color-accent:#c5c7c9;--light-color-active-menu-item:var(--light-color-accent);--light-color-text:#222;--light-color-text-aside:#6e6e6e;--light-color-link:#1f70c2;--light-color-focus-outline:#3584e4;--light-color-ts-keyword:#056bd6;--light-color-ts-project:#b111c9;--light-color-ts-module:var(--light-color-ts-project);--light-color-ts-namespace:var(--light-color-ts-project);--light-color-ts-enum:#7e6f15;--light-color-ts-enum-member:var(--light-color-ts-enum);--light-color-ts-variable:#4760ec;--light-color-ts-function:#572be7;--light-color-ts-class:#1f70c2;--light-color-ts-interface:#108024;--light-color-ts-constructor:var(--light-color-ts-class);--light-color-ts-property:var(--light-color-ts-variable);--light-color-ts-method:var(--light-color-ts-function);--light-color-ts-call-signature:var(--light-color-ts-method);--light-color-ts-index-signature:var(--light-color-ts-property);--light-color-ts-constructor-signature:var(--light-color-ts-constructor);--light-color-ts-parameter:var(--light-color-ts-variable);--light-color-ts-type-parameter:#a55c0e;--light-color-ts-accessor:var(--light-color-ts-property);--light-color-ts-get-signature:var(--light-color-ts-accessor);--light-color-ts-set-signature:var(--light-color-ts-accessor);--light-color-ts-type-alias:#d51270;--light-color-document:#000;--light-external-icon:url("data:image/svg+xml;utf8,");--light-color-scheme:light;--dark-color-background:#2b2e33;--dark-color-background-secondary:#1e2024;--dark-color-background-warning:#bebe00;--dark-color-warning-text:#222;--dark-color-icon-background:var(--dark-color-background-secondary);--dark-color-accent:#9096a2;--dark-color-active-menu-item:#5d5d6a;--dark-color-text:#f5f5f5;--dark-color-text-aside:#ddd;--dark-color-link:#00aff4;--dark-color-focus-outline:#4c97f2;--dark-color-ts-keyword:#39f;--dark-color-ts-project:#e358ff;--dark-color-ts-module:var(--dark-color-ts-project);--dark-color-ts-namespace:var(--dark-color-ts-project);--dark-color-ts-enum:#f4d93e;--dark-color-ts-enum-member:var(--dark-color-ts-enum);--dark-color-ts-variable:#798dff;--dark-color-ts-function:#a280ff;--dark-color-ts-class:#8ac4ff;--dark-color-ts-interface:#6cff87;--dark-color-ts-constructor:var(--dark-color-ts-class);--dark-color-ts-property:var(--dark-color-ts-variable);--dark-color-ts-method:var(--dark-color-ts-function);--dark-color-ts-call-signature:var(--dark-color-ts-method);--dark-color-ts-index-signature:var(--dark-color-ts-property);--dark-color-ts-constructor-signature:var(--dark-color-ts-constructor);--dark-color-ts-parameter:var(--dark-color-ts-variable);--dark-color-ts-type-parameter:#e07d13;--dark-color-ts-accessor:var(--dark-color-ts-property);--dark-color-ts-get-signature:var(--dark-color-ts-accessor);--dark-color-ts-set-signature:var(--dark-color-ts-accessor);--dark-color-ts-type-alias:#ff6492;--dark-color-document:#fff;--dark-external-icon:url("data:image/svg+xml;utf8,");--dark-color-scheme:dark}@media (prefers-color-scheme:light){:root{--color-background:var(--light-color-background);--color-background-secondary:var(--light-color-background-secondary);--color-background-warning:var(--light-color-background-warning);--color-warning-text:var(--light-color-warning-text);--color-icon-background:var(--light-color-icon-background);--color-accent:var(--light-color-accent);--color-active-menu-item:var(--light-color-active-menu-item);--color-text:var(--light-color-text);--color-text-aside:var(--light-color-text-aside);--color-link:var(--light-color-link);--color-focus-outline:var(--light-color-focus-outline);--color-ts-keyword:var(--light-color-ts-keyword);--color-ts-module:var(--light-color-ts-module);--color-ts-namespace:var(--light-color-ts-namespace);--color-ts-enum:var(--light-color-ts-enum);--color-ts-enum-member:var(--light-color-ts-enum-member);--color-ts-variable:var(--light-color-ts-variable);--color-ts-function:var(--light-color-ts-function);--color-ts-class:var(--light-color-ts-class);--color-ts-interface:var(--light-color-ts-interface);--color-ts-constructor:var(--light-color-ts-constructor);--color-ts-property:var(--light-color-ts-property);--color-ts-method:var(--light-color-ts-method);--color-ts-call-signature:var(--light-color-ts-call-signature);--color-ts-index-signature:var(--light-color-ts-index-signature);--color-ts-constructor-signature:var( +@layer typedoc{:root{--light-color-background:#f2f4f8;--light-color-background-secondary:#eff0f1;--light-color-warning-text:#222;--light-color-background-warning:#e6e600;--light-color-accent:#c5c7c9;--light-color-active-menu-item:var(--light-color-accent);--light-color-text:#222;--light-color-text-aside:#6e6e6e;--light-color-icon-background:var(--light-color-background);--light-color-icon-text:var(--light-color-text);--light-color-comment-tag-text:var(--light-color-text);--light-color-comment-tag:var(--light-color-background);--light-color-link:#1f70c2;--light-color-focus-outline:#3584e4;--light-color-ts-keyword:#056bd6;--light-color-ts-project:#b111c9;--light-color-ts-module:var(--light-color-ts-project);--light-color-ts-namespace:var(--light-color-ts-project);--light-color-ts-enum:#7e6f15;--light-color-ts-enum-member:var(--light-color-ts-enum);--light-color-ts-variable:#4760ec;--light-color-ts-function:#572be7;--light-color-ts-class:#1f70c2;--light-color-ts-interface:#108024;--light-color-ts-constructor:var(--light-color-ts-class);--light-color-ts-property:#9f5f30;--light-color-ts-method:#be3989;--light-color-ts-reference:#ff4d82;--light-color-ts-call-signature:var(--light-color-ts-method);--light-color-ts-index-signature:var(--light-color-ts-property);--light-color-ts-constructor-signature:var( + --light-color-ts-constructor + );--light-color-ts-parameter:var(--light-color-ts-variable);--light-color-ts-type-parameter:#a55c0e;--light-color-ts-accessor:#c73c3c;--light-color-ts-get-signature:var(--light-color-ts-accessor);--light-color-ts-set-signature:var(--light-color-ts-accessor);--light-color-ts-type-alias:#d51270;--light-color-document:#000;--light-color-alert-note:#0969d9;--light-color-alert-tip:#1a7f37;--light-color-alert-important:#8250df;--light-color-alert-warning:#9a6700;--light-color-alert-caution:#cf222e;--light-external-icon:url("data:image/svg+xml;utf8,");--light-color-scheme:light;--dark-color-background:#2b2e33;--dark-color-background-secondary:#1e2024;--dark-color-background-warning:#bebe00;--dark-color-warning-text:#222;--dark-color-accent:#9096a2;--dark-color-active-menu-item:#5d5d6a;--dark-color-text:#f5f5f5;--dark-color-text-aside:#ddd;--dark-color-icon-background:var(--dark-color-background-secondary);--dark-color-icon-text:var(--dark-color-text);--dark-color-comment-tag-text:var(--dark-color-text);--dark-color-comment-tag:var(--dark-color-background);--dark-color-link:#00aff4;--dark-color-focus-outline:#4c97f2;--dark-color-ts-keyword:#39f;--dark-color-ts-project:#e358ff;--dark-color-ts-module:var(--dark-color-ts-project);--dark-color-ts-namespace:var(--dark-color-ts-project);--dark-color-ts-enum:#f4d93e;--dark-color-ts-enum-member:var(--dark-color-ts-enum);--dark-color-ts-variable:#798dff;--dark-color-ts-function:#a280ff;--dark-color-ts-class:#8ac4ff;--dark-color-ts-interface:#6cff87;--dark-color-ts-constructor:var(--dark-color-ts-class);--dark-color-ts-property:#ff984d;--dark-color-ts-method:#ff4db8;--dark-color-ts-reference:#ff4d82;--dark-color-ts-call-signature:var(--dark-color-ts-method);--dark-color-ts-index-signature:var(--dark-color-ts-property);--dark-color-ts-constructor-signature:var(--dark-color-ts-constructor);--dark-color-ts-parameter:var(--dark-color-ts-variable);--dark-color-ts-type-parameter:#e07d13;--dark-color-ts-accessor:#ff6060;--dark-color-ts-get-signature:var(--dark-color-ts-accessor);--dark-color-ts-set-signature:var(--dark-color-ts-accessor);--dark-color-ts-type-alias:#ff6492;--dark-color-document:#fff;--dark-color-alert-note:#0969d9;--dark-color-alert-tip:#1a7f37;--dark-color-alert-important:#8250df;--dark-color-alert-warning:#9a6700;--dark-color-alert-caution:#cf222e;--dark-external-icon:url("data:image/svg+xml;utf8,");--dark-color-scheme:dark}@media (prefers-color-scheme:light){:root{--color-background:var(--light-color-background);--color-background-secondary:var( + --light-color-background-secondary + );--color-background-warning:var(--light-color-background-warning);--color-warning-text:var(--light-color-warning-text);--color-accent:var(--light-color-accent);--color-active-menu-item:var(--light-color-active-menu-item);--color-text:var(--light-color-text);--color-text-aside:var(--light-color-text-aside);--color-icon-background:var(--light-color-icon-background);--color-icon-text:var(--light-color-icon-text);--color-comment-tag-text:var(--light-color-text);--color-comment-tag:var(--light-color-background);--color-link:var(--light-color-link);--color-focus-outline:var(--light-color-focus-outline);--color-ts-keyword:var(--light-color-ts-keyword);--color-ts-project:var(--light-color-ts-project);--color-ts-module:var(--light-color-ts-module);--color-ts-namespace:var(--light-color-ts-namespace);--color-ts-enum:var(--light-color-ts-enum);--color-ts-enum-member:var(--light-color-ts-enum-member);--color-ts-variable:var(--light-color-ts-variable);--color-ts-function:var(--light-color-ts-function);--color-ts-class:var(--light-color-ts-class);--color-ts-interface:var(--light-color-ts-interface);--color-ts-constructor:var(--light-color-ts-constructor);--color-ts-property:var(--light-color-ts-property);--color-ts-method:var(--light-color-ts-method);--color-ts-reference:var(--light-color-ts-reference);--color-ts-call-signature:var(--light-color-ts-call-signature);--color-ts-index-signature:var(--light-color-ts-index-signature);--color-ts-constructor-signature:var( + --light-color-ts-constructor-signature + );--color-ts-parameter:var(--light-color-ts-parameter);--color-ts-type-parameter:var(--light-color-ts-type-parameter);--color-ts-accessor:var(--light-color-ts-accessor);--color-ts-get-signature:var(--light-color-ts-get-signature);--color-ts-set-signature:var(--light-color-ts-set-signature);--color-ts-type-alias:var(--light-color-ts-type-alias);--color-document:var(--light-color-document);--color-alert-note:var(--light-color-alert-note);--color-alert-tip:var(--light-color-alert-tip);--color-alert-important:var(--light-color-alert-important);--color-alert-warning:var(--light-color-alert-warning);--color-alert-caution:var(--light-color-alert-caution);--external-icon:var(--light-external-icon);--color-scheme:var(--light-color-scheme)}}@media (prefers-color-scheme:dark){:root{--color-background:var(--dark-color-background);--color-background-secondary:var( + --dark-color-background-secondary + );--color-background-warning:var(--dark-color-background-warning);--color-warning-text:var(--dark-color-warning-text);--color-accent:var(--dark-color-accent);--color-active-menu-item:var(--dark-color-active-menu-item);--color-text:var(--dark-color-text);--color-text-aside:var(--dark-color-text-aside);--color-icon-background:var(--dark-color-icon-background);--color-icon-text:var(--dark-color-icon-text);--color-comment-tag-text:var(--dark-color-text);--color-comment-tag:var(--dark-color-background);--color-link:var(--dark-color-link);--color-focus-outline:var(--dark-color-focus-outline);--color-ts-keyword:var(--dark-color-ts-keyword);--color-ts-project:var(--dark-color-ts-project);--color-ts-module:var(--dark-color-ts-module);--color-ts-namespace:var(--dark-color-ts-namespace);--color-ts-enum:var(--dark-color-ts-enum);--color-ts-enum-member:var(--dark-color-ts-enum-member);--color-ts-variable:var(--dark-color-ts-variable);--color-ts-function:var(--dark-color-ts-function);--color-ts-class:var(--dark-color-ts-class);--color-ts-interface:var(--dark-color-ts-interface);--color-ts-constructor:var(--dark-color-ts-constructor);--color-ts-property:var(--dark-color-ts-property);--color-ts-method:var(--dark-color-ts-method);--color-ts-reference:var(--dark-color-ts-reference);--color-ts-call-signature:var(--dark-color-ts-call-signature);--color-ts-index-signature:var(--dark-color-ts-index-signature);--color-ts-constructor-signature:var( + --dark-color-ts-constructor-signature + );--color-ts-parameter:var(--dark-color-ts-parameter);--color-ts-type-parameter:var(--dark-color-ts-type-parameter);--color-ts-accessor:var(--dark-color-ts-accessor);--color-ts-get-signature:var(--dark-color-ts-get-signature);--color-ts-set-signature:var(--dark-color-ts-set-signature);--color-ts-type-alias:var(--dark-color-ts-type-alias);--color-document:var(--dark-color-document);--color-alert-note:var(--dark-color-alert-note);--color-alert-tip:var(--dark-color-alert-tip);--color-alert-important:var(--dark-color-alert-important);--color-alert-warning:var(--dark-color-alert-warning);--color-alert-caution:var(--dark-color-alert-caution);--external-icon:var(--dark-external-icon);--color-scheme:var(--dark-color-scheme)}}html{color-scheme:var(--color-scheme)}body{margin:0}:root[data-theme=light]{--color-background:var(--light-color-background);--color-background-secondary:var(--light-color-background-secondary);--color-background-warning:var(--light-color-background-warning);--color-warning-text:var(--light-color-warning-text);--color-icon-background:var(--light-color-icon-background);--color-accent:var(--light-color-accent);--color-active-menu-item:var(--light-color-active-menu-item);--color-text:var(--light-color-text);--color-text-aside:var(--light-color-text-aside);--color-icon-text:var(--light-color-icon-text);--color-comment-tag-text:var(--light-color-text);--color-comment-tag:var(--light-color-background);--color-link:var(--light-color-link);--color-focus-outline:var(--light-color-focus-outline);--color-ts-keyword:var(--light-color-ts-keyword);--color-ts-project:var(--light-color-ts-project);--color-ts-module:var(--light-color-ts-module);--color-ts-namespace:var(--light-color-ts-namespace);--color-ts-enum:var(--light-color-ts-enum);--color-ts-enum-member:var(--light-color-ts-enum-member);--color-ts-variable:var(--light-color-ts-variable);--color-ts-function:var(--light-color-ts-function);--color-ts-class:var(--light-color-ts-class);--color-ts-interface:var(--light-color-ts-interface);--color-ts-constructor:var(--light-color-ts-constructor);--color-ts-property:var(--light-color-ts-property);--color-ts-method:var(--light-color-ts-method);--color-ts-reference:var(--light-color-ts-reference);--color-ts-call-signature:var(--light-color-ts-call-signature);--color-ts-index-signature:var(--light-color-ts-index-signature);--color-ts-constructor-signature:var( --light-color-ts-constructor-signature - );--color-ts-parameter:var(--light-color-ts-parameter);--color-ts-type-parameter:var(--light-color-ts-type-parameter);--color-ts-accessor:var(--light-color-ts-accessor);--color-ts-get-signature:var(--light-color-ts-get-signature);--color-ts-set-signature:var(--light-color-ts-set-signature);--color-ts-type-alias:var(--light-color-ts-type-alias);--color-document:var(--light-color-document);--external-icon:var(--light-external-icon);--color-scheme:var(--light-color-scheme)}}@media (prefers-color-scheme:dark){:root{--color-background:var(--dark-color-background);--color-background-secondary:var(--dark-color-background-secondary);--color-background-warning:var(--dark-color-background-warning);--color-warning-text:var(--dark-color-warning-text);--color-icon-background:var(--dark-color-icon-background);--color-accent:var(--dark-color-accent);--color-active-menu-item:var(--dark-color-active-menu-item);--color-text:var(--dark-color-text);--color-text-aside:var(--dark-color-text-aside);--color-link:var(--dark-color-link);--color-focus-outline:var(--dark-color-focus-outline);--color-ts-keyword:var(--dark-color-ts-keyword);--color-ts-module:var(--dark-color-ts-module);--color-ts-namespace:var(--dark-color-ts-namespace);--color-ts-enum:var(--dark-color-ts-enum);--color-ts-enum-member:var(--dark-color-ts-enum-member);--color-ts-variable:var(--dark-color-ts-variable);--color-ts-function:var(--dark-color-ts-function);--color-ts-class:var(--dark-color-ts-class);--color-ts-interface:var(--dark-color-ts-interface);--color-ts-constructor:var(--dark-color-ts-constructor);--color-ts-property:var(--dark-color-ts-property);--color-ts-method:var(--dark-color-ts-method);--color-ts-call-signature:var(--dark-color-ts-call-signature);--color-ts-index-signature:var(--dark-color-ts-index-signature);--color-ts-constructor-signature:var( + );--color-ts-parameter:var(--light-color-ts-parameter);--color-ts-type-parameter:var(--light-color-ts-type-parameter);--color-ts-accessor:var(--light-color-ts-accessor);--color-ts-get-signature:var(--light-color-ts-get-signature);--color-ts-set-signature:var(--light-color-ts-set-signature);--color-ts-type-alias:var(--light-color-ts-type-alias);--color-document:var(--light-color-document);--color-note:var(--light-color-note);--color-tip:var(--light-color-tip);--color-important:var(--light-color-important);--color-warning:var(--light-color-warning);--color-caution:var(--light-color-caution);--external-icon:var(--light-external-icon);--color-scheme:var(--light-color-scheme)}:root[data-theme=dark]{--color-background:var(--dark-color-background);--color-background-secondary:var(--dark-color-background-secondary);--color-background-warning:var(--dark-color-background-warning);--color-warning-text:var(--dark-color-warning-text);--color-icon-background:var(--dark-color-icon-background);--color-accent:var(--dark-color-accent);--color-active-menu-item:var(--dark-color-active-menu-item);--color-text:var(--dark-color-text);--color-text-aside:var(--dark-color-text-aside);--color-icon-text:var(--dark-color-icon-text);--color-comment-tag-text:var(--dark-color-text);--color-comment-tag:var(--dark-color-background);--color-link:var(--dark-color-link);--color-focus-outline:var(--dark-color-focus-outline);--color-ts-keyword:var(--dark-color-ts-keyword);--color-ts-project:var(--dark-color-ts-project);--color-ts-module:var(--dark-color-ts-module);--color-ts-namespace:var(--dark-color-ts-namespace);--color-ts-enum:var(--dark-color-ts-enum);--color-ts-enum-member:var(--dark-color-ts-enum-member);--color-ts-variable:var(--dark-color-ts-variable);--color-ts-function:var(--dark-color-ts-function);--color-ts-class:var(--dark-color-ts-class);--color-ts-interface:var(--dark-color-ts-interface);--color-ts-constructor:var(--dark-color-ts-constructor);--color-ts-property:var(--dark-color-ts-property);--color-ts-method:var(--dark-color-ts-method);--color-ts-reference:var(--dark-color-ts-reference);--color-ts-call-signature:var(--dark-color-ts-call-signature);--color-ts-index-signature:var(--dark-color-ts-index-signature);--color-ts-constructor-signature:var( --dark-color-ts-constructor-signature - );--color-ts-parameter:var(--dark-color-ts-parameter);--color-ts-type-parameter:var(--dark-color-ts-type-parameter);--color-ts-accessor:var(--dark-color-ts-accessor);--color-ts-get-signature:var(--dark-color-ts-get-signature);--color-ts-set-signature:var(--dark-color-ts-set-signature);--color-ts-type-alias:var(--dark-color-ts-type-alias);--color-document:var(--dark-color-document);--external-icon:var(--dark-external-icon);--color-scheme:var(--dark-color-scheme)}}html{color-scheme:var(--color-scheme)}body{margin:0}:root[data-theme=light]{--color-background:var(--light-color-background);--color-background-secondary:var(--light-color-background-secondary);--color-background-warning:var(--light-color-background-warning);--color-warning-text:var(--light-color-warning-text);--color-icon-background:var(--light-color-icon-background);--color-accent:var(--light-color-accent);--color-active-menu-item:var(--light-color-active-menu-item);--color-text:var(--light-color-text);--color-text-aside:var(--light-color-text-aside);--color-link:var(--light-color-link);--color-focus-outline:var(--light-color-focus-outline);--color-ts-keyword:var(--light-color-ts-keyword);--color-ts-module:var(--light-color-ts-module);--color-ts-namespace:var(--light-color-ts-namespace);--color-ts-enum:var(--light-color-ts-enum);--color-ts-enum-member:var(--light-color-ts-enum-member);--color-ts-variable:var(--light-color-ts-variable);--color-ts-function:var(--light-color-ts-function);--color-ts-class:var(--light-color-ts-class);--color-ts-interface:var(--light-color-ts-interface);--color-ts-constructor:var(--light-color-ts-constructor);--color-ts-property:var(--light-color-ts-property);--color-ts-method:var(--light-color-ts-method);--color-ts-call-signature:var(--light-color-ts-call-signature);--color-ts-index-signature:var(--light-color-ts-index-signature);--color-ts-constructor-signature:var( - --light-color-ts-constructor-signature - );--color-ts-parameter:var(--light-color-ts-parameter);--color-ts-type-parameter:var(--light-color-ts-type-parameter);--color-ts-accessor:var(--light-color-ts-accessor);--color-ts-get-signature:var(--light-color-ts-get-signature);--color-ts-set-signature:var(--light-color-ts-set-signature);--color-ts-type-alias:var(--light-color-ts-type-alias);--color-document:var(--light-color-document);--external-icon:var(--light-external-icon);--color-scheme:var(--light-color-scheme)}:root[data-theme=dark]{--color-background:var(--dark-color-background);--color-background-secondary:var(--dark-color-background-secondary);--color-background-warning:var(--dark-color-background-warning);--color-warning-text:var(--dark-color-warning-text);--color-icon-background:var(--dark-color-icon-background);--color-accent:var(--dark-color-accent);--color-active-menu-item:var(--dark-color-active-menu-item);--color-text:var(--dark-color-text);--color-text-aside:var(--dark-color-text-aside);--color-link:var(--dark-color-link);--color-focus-outline:var(--dark-color-focus-outline);--color-ts-keyword:var(--dark-color-ts-keyword);--color-ts-module:var(--dark-color-ts-module);--color-ts-namespace:var(--dark-color-ts-namespace);--color-ts-enum:var(--dark-color-ts-enum);--color-ts-enum-member:var(--dark-color-ts-enum-member);--color-ts-variable:var(--dark-color-ts-variable);--color-ts-function:var(--dark-color-ts-function);--color-ts-class:var(--dark-color-ts-class);--color-ts-interface:var(--dark-color-ts-interface);--color-ts-constructor:var(--dark-color-ts-constructor);--color-ts-property:var(--dark-color-ts-property);--color-ts-method:var(--dark-color-ts-method);--color-ts-call-signature:var(--dark-color-ts-call-signature);--color-ts-index-signature:var(--dark-color-ts-index-signature);--color-ts-constructor-signature:var( - --dark-color-ts-constructor-signature - );--color-ts-parameter:var(--dark-color-ts-parameter);--color-ts-type-parameter:var(--dark-color-ts-type-parameter);--color-ts-accessor:var(--dark-color-ts-accessor);--color-ts-get-signature:var(--dark-color-ts-get-signature);--color-ts-set-signature:var(--dark-color-ts-set-signature);--color-ts-type-alias:var(--dark-color-ts-type-alias);--color-document:var(--dark-color-document);--external-icon:var(--dark-external-icon);--color-scheme:var(--dark-color-scheme)}.tsd-accordion-summary:focus-visible svg,:focus-visible{outline:2px solid var(--color-focus-outline)}.always-visible,.always-visible .tsd-signatures{display:inherit!important}h1,h2,h3,h4,h5,h6{line-height:1.2}h1{font-size:1.875rem;margin:.67rem 0}h2{font-size:1.5rem;margin:.83rem 0}h3{font-size:1.25rem;margin:1rem 0}h4{font-size:1.05rem;margin:1.33rem 0}h5{font-size:1rem;margin:1.5rem 0}h6{font-size:.875rem;margin:2.33rem 0}dl,menu,ol,ul{margin:1em 0}dd{margin:0 0 0 40px}.container{max-width:1700px;padding:0 2rem}footer{border-top:1px solid var(--color-accent);max-height:3.5rem;padding-bottom:1rem;padding-top:1rem}footer>p{margin:0 1em}.container-main{margin:0 auto;min-height:calc(100vh - 97px - 4rem)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1;visibility:visible}to{opacity:0}}@keyframes fade-in-delayed{0%{opacity:0}33%{opacity:0}to{opacity:1}}@keyframes fade-out-delayed{0%{opacity:1;visibility:visible}66%{opacity:0}to{opacity:0}}@keyframes pop-in-from-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes pop-out-to-right{0%{transform:translate(0);visibility:visible}to{transform:translate(100%)}}body{background:var(--color-background);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:16px}a{color:var(--color-link);text-decoration:none}a:hover{text-decoration:underline}a.external[target=_blank]{background-image:var(--external-icon);background-position:top 3px right;background-repeat:no-repeat;padding-right:13px}a.tsd-anchor-link{color:var(--color-text)}code,pre{border-radius:.8em;font-family:Menlo,Monaco,Consolas,Courier New,monospace;font-size:.875rem;margin:0;padding:.2em}pre{word-wrap:break-word;border:1px solid var(--color-accent);padding:10px;position:relative;white-space:pre;white-space:pre-wrap}pre code{font-size:100%;padding:0}pre>button{box-sizing:border-box;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .1s}pre:hover>button,pre>button.visible{opacity:1}blockquote{border-left:4px solid gray;margin:1em 0;padding-left:1em}.tsd-typography{line-height:1.333em}.tsd-typography ul{list-style:square;margin:0;padding:0 0 0 20px}.tsd-index-panel .tsd-typography h3,.tsd-typography .tsd-index-panel h3,.tsd-typography h4,.tsd-typography h5,.tsd-typography h6{font-size:1em}.tsd-typography h5,.tsd-typography h6{font-weight:400}.tsd-typography ol,.tsd-typography p,.tsd-typography ul{margin:1em 0}.tsd-typography table{border:none;border-collapse:collapse}.tsd-typography td,.tsd-typography th{border:1px solid var(--color-accent);padding:6px 13px}.tsd-typography thead,.tsd-typography tr:nth-child(2n){background-color:var(--color-background-secondary)}.tsd-breadcrumb{color:var(--color-text-aside);margin:0;padding:0}.tsd-breadcrumb a{color:var(--color-text-aside);text-decoration:none}.tsd-breadcrumb a:hover{text-decoration:underline}.tsd-breadcrumb li{display:inline}.tsd-breadcrumb li:after{content:" / "}.tsd-comment-tags{display:flex;flex-direction:column}dl.tsd-comment-tag-group{align-items:center;display:flex;margin:.5em 0;overflow:hidden}dl.tsd-comment-tag-group dt{display:flex;font-size:.875em;font-weight:400;margin-right:.5em}dl.tsd-comment-tag-group dd{margin:0}code.tsd-tag{border:.1em solid var(--color-accent);font-size:70%;margin-right:.25em;padding:.25em .4em}h1 code.tsd-tag:first-of-type{margin-left:.25em}dl.tsd-comment-tag-group dd:after,dl.tsd-comment-tag-group dd:before{content:" "}dl.tsd-comment-tag-group dd pre,dl.tsd-comment-tag-group dd:after{clear:both}dl.tsd-comment-tag-group p{margin:0}.tsd-panel.tsd-comment .lead{font-size:1.1em;line-height:1.333em;margin-bottom:2em}.tsd-panel.tsd-comment .lead:last-child{margin-bottom:0}.tsd-filter-visibility h4{font-size:1rem;margin:0;padding-bottom:.5rem;padding-top:.75rem}.tsd-filter-item:not(:last-child){margin-bottom:.5rem}.tsd-filter-input{align-items:center;cursor:pointer;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:-moz-fit-content;width:fit-content}.tsd-filter-input input[type=checkbox]{cursor:pointer;height:1.5em;opacity:0;position:absolute;width:1.5em}.tsd-filter-input input[type=checkbox]:disabled{pointer-events:none}.tsd-filter-input svg{border-radius:.33em;cursor:pointer;height:1.5em;margin-right:.5em;opacity:.99;width:1.5em}.tsd-filter-input input[type=checkbox]:focus-visible+svg{outline:2px solid var(--color-focus-outline)}.tsd-checkbox-background{fill:var(--color-accent)}input[type=checkbox]:checked~svg .tsd-checkbox-checkmark{stroke:var(--color-text)}.tsd-filter-input input:disabled~svg>.tsd-checkbox-background{fill:var(--color-background);stroke:var(--color-accent);stroke-width:.25rem}.tsd-filter-input input:disabled~svg>.tsd-checkbox-checkmark{stroke:var(--color-accent)}.settings-label{display:inline-block;font-weight:700;text-transform:uppercase}.tsd-filter-visibility .settings-label{margin:.75rem 0 .5rem}.tsd-theme-toggle .settings-label{margin:.75rem .75rem 0 0}.tsd-hierarchy{list-style:square;margin:0}.tsd-hierarchy .target{font-weight:700}.tsd-full-hierarchy:not(:last-child){border-bottom:1px solid var(--color-accent);margin-bottom:1em;padding-bottom:1em}.tsd-full-hierarchy,.tsd-full-hierarchy ul{list-style:none;margin:0;padding:0}.tsd-full-hierarchy ul{padding-left:1.5rem}.tsd-full-hierarchy a{align-items:center;color:var(--color-text);display:inline-flex;font-size:1rem;padding:.25rem 0!important}.tsd-panel-group.tsd-index-group{margin-bottom:0}.tsd-index-panel .tsd-index-list{column-gap:1rem;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:auto;line-height:1.333em;list-style:none;margin:0;overflow:hidden;padding:.25rem 0 0}@media (max-width:1024px){.tsd-index-panel .tsd-index-list{grid-template-columns:repeat(2,1fr)}}@media (max-width:768px){.tsd-index-panel .tsd-index-list{grid-template-columns:repeat(1,1fr)}}.tsd-index-panel .tsd-index-list li{-webkit-page-break-inside:avoid;-moz-page-break-inside:avoid;-ms-page-break-inside:avoid;-o-page-break-inside:avoid;page-break-inside:avoid}.tsd-flag{background-color:var(--color-comment-tag);border-radius:4px;color:var(--color-comment-tag-text);display:inline-block;font-size:75%;font-weight:400;line-height:1;padding:.25em .4em;text-indent:0}.tsd-anchor{top:-100px}.tsd-anchor,.tsd-member{position:relative}.tsd-member .tsd-anchor+h3{align-items:center;border-bottom:none;display:flex;margin-bottom:0;margin-top:0}.tsd-navigation.settings{margin:1rem 0}.tsd-navigation .tsd-accordion-summary,.tsd-navigation>a{align-items:center;display:flex;width:calc(100% - .25rem)}.tsd-navigation a,.tsd-navigation summary>span,.tsd-page-navigation a{align-items:center;box-sizing:border-box;color:var(--color-text);display:flex;padding:.25rem;text-decoration:none;width:calc(100% - .25rem)}.tsd-navigation a.current,.tsd-page-navigation a.current{background:var(--color-active-menu-item)}.tsd-navigation a:hover,.tsd-page-navigation a:hover{text-decoration:underline}.tsd-navigation ul,.tsd-page-navigation ul{list-style:none;margin-bottom:0;margin-top:0;padding:0}.tsd-navigation li,.tsd-page-navigation li{max-width:100%;padding:0}.tsd-navigation .tsd-nav-link{display:none}.tsd-nested-navigation{margin-left:3rem}.tsd-nested-navigation>li>details{margin-left:-1.5rem}.tsd-small-nested-navigation{margin-left:1.5rem}.tsd-small-nested-navigation>li>details{margin-left:-1.5rem}.tsd-page-navigation-section{margin-left:10px}.tsd-page-navigation-section>summary{padding:.25rem}.tsd-page-navigation-section>div{margin-left:20px}.tsd-page-navigation ul{padding-left:1.75rem}#tsd-sidebar-links a{line-height:1.25rem;margin-bottom:.5rem;margin-top:0}#tsd-sidebar-links a:last-of-type{margin-bottom:0}a.tsd-index-link{align-items:center;color:var(--color-text);display:inline-flex;font-size:1rem;line-height:1.25rem;padding:.25rem 0!important}.tsd-accordion-summary{list-style-type:none;outline:none}.tsd-accordion-summary::-webkit-details-marker{display:none}.tsd-accordion-summary,.tsd-accordion-summary a{cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tsd-accordion-summary a{width:calc(100% - 1.5rem)}.tsd-accordion-summary>*{margin-bottom:0;margin-top:0;padding-bottom:0;padding-top:0}.tsd-accordion .tsd-accordion-summary>svg{margin-left:.25rem;vertical-align:text-top}.tsd-index-content>:not(:first-child){margin-top:.75rem}.tsd-index-heading{margin-bottom:.75rem;margin-top:1.5rem}.tsd-kind-icon{height:1.25rem;margin-right:.5rem;min-height:1.25rem;min-width:1.25rem;width:1.25rem}.tsd-kind-icon path{transform:scale(1.1);transform-origin:center}.tsd-signature>.tsd-kind-icon{margin-right:.8rem}.tsd-panel{margin-bottom:2.5rem}.tsd-panel.tsd-member{margin-bottom:4rem}.tsd-panel:empty{display:none}.tsd-panel>h1,.tsd-panel>h2,.tsd-panel>h3{margin:1.5rem -1.5rem .75rem;padding:0 1.5rem .75rem}.tsd-panel>h1.tsd-before-signature,.tsd-panel>h2.tsd-before-signature,.tsd-panel>h3.tsd-before-signature{border-bottom:none;margin-bottom:0}.tsd-panel-group,.tsd-panel-group.tsd-index-group,.tsd-panel-group.tsd-index-group details{margin:2rem 0}.tsd-panel-group>.tsd-accordion-summary{margin-bottom:1rem}#tsd-search{transition:background-color .2s}#tsd-search .title{position:relative;z-index:2}#tsd-search .field{height:100%;left:0;position:absolute;right:2.5rem;top:0}#tsd-search .field input{background:transparent;border:0;box-sizing:border-box;color:var(--color-text);opacity:0;outline:0;padding:0 10px;position:relative;top:-50px;width:100%;z-index:1}#tsd-search .field label{overflow:hidden;position:absolute;right:-40px}#tsd-search .field input,#tsd-search .title,#tsd-toolbar-links a{transition:opacity .2s}#tsd-search .results{box-shadow:0 0 4px rgba(0,0,0,.25);list-style:none;margin:0;padding:0;position:absolute;top:40px;visibility:hidden;width:100%}#tsd-search .results li{background-color:var(--color-background);line-height:normal;padding:4px}#tsd-search .results li:nth-child(2n){background-color:var(--color-background-secondary)}#tsd-search .results li.state{display:none}#tsd-search .results li.current:not(.no-results),#tsd-search .results li:hover:not(.no-results){background-color:var(--color-accent)}#tsd-search .results a{align-items:center;box-sizing:border-box;display:flex;padding:.25rem}#tsd-search .results a:before{top:10px}#tsd-search .results span.parent{color:var(--color-text-aside);font-weight:400}#tsd-search.has-focus{background-color:var(--color-accent)}#tsd-search.has-focus .field input{opacity:1;top:0}#tsd-search.has-focus #tsd-toolbar-links a,#tsd-search.has-focus .title{opacity:0;z-index:0}#tsd-search.has-focus .results{visibility:visible}#tsd-search.failure .results li.state.failure,#tsd-search.loading .results li.state.loading{display:block}#tsd-toolbar-links{align-items:center;display:flex;height:100%;justify-content:flex-end;position:absolute;right:2rem;top:0}#tsd-toolbar-links a{margin-left:1.5rem}#tsd-toolbar-links a:hover{text-decoration:underline}.tsd-signature{border:1px solid var(--color-accent);font-family:Menlo,Monaco,Consolas,Courier New,monospace;font-size:14px;margin:0 0 1rem;overflow-x:auto;padding:1rem .5rem}.tsd-signature-keyword{color:var(--color-ts-keyword);font-weight:400}.tsd-signature-symbol{color:var(--color-text-aside);font-weight:400}.tsd-signature-type{font-style:italic;font-weight:400}.tsd-signatures{list-style-type:none;margin:0 0 1em;padding:0}.tsd-signatures .tsd-signature{border-color:var(--color-accent);border-width:1px 0;margin:0;transition:background-color .1s}.tsd-signatures .tsd-index-signature:not(:last-child){margin-bottom:1em}.tsd-description .tsd-signatures .tsd-signature,.tsd-signatures .tsd-index-signature .tsd-signature{border-width:1px}ul.tsd-parameter-list,ul.tsd-type-parameter-list{list-style:square;margin:0;padding-left:20px}ul.tsd-parameter-list>li.tsd-parameter-signature,ul.tsd-type-parameter-list>li.tsd-parameter-signature{list-style:none;margin-left:-20px}ul.tsd-parameter-list h5,ul.tsd-type-parameter-list h5{font-size:16px;margin:1em 0 .5em}.tsd-sources{font-size:.875em;margin-top:1rem}.tsd-sources a{color:var(--color-text-aside);text-decoration:underline}.tsd-sources ul{list-style:none;padding:0}.tsd-page-toolbar{background:var(--color-background-secondary);border-bottom:1px solid var(--color-accent);color:var(--color-text);left:0;position:sticky;top:0;transition:transform .3s ease-in-out;width:100%;z-index:1}.tsd-page-toolbar a{color:var(--color-text);text-decoration:none}.tsd-page-toolbar a.title{font-weight:700}.tsd-page-toolbar a.title:hover{text-decoration:underline}.tsd-page-toolbar .tsd-toolbar-contents{display:flex;height:2.5rem;justify-content:space-between;margin:0 auto}.tsd-page-toolbar .table-cell{line-height:40px;position:relative;white-space:nowrap}.tsd-page-toolbar .table-cell:first-child{width:100%}.tsd-page-toolbar .tsd-toolbar-icon{box-sizing:border-box;line-height:0;padding:12px 0}.tsd-widget{cursor:pointer;display:inline-block;height:40px;opacity:.8;overflow:hidden;transition:opacity .1s,background-color .2s;vertical-align:bottom}.tsd-widget:hover{opacity:.9}.tsd-widget.active{background-color:var(--color-accent);opacity:1}.tsd-widget.no-caption{width:40px}.tsd-widget.no-caption:before{margin:0}.tsd-widget.menu,.tsd-widget.options{display:none}input[type=checkbox]+.tsd-widget:before{background-position:-120px 0}input[type=checkbox]:checked+.tsd-widget:before{background-position:-160px 0}img{max-width:100%}.tsd-anchor-icon{align-items:center;color:var(--color-text);display:inline-flex;margin-left:.5rem;vertical-align:middle}.tsd-anchor-icon svg{height:1em;visibility:hidden;width:1em}.tsd-anchor-link:hover>.tsd-anchor-icon svg{visibility:visible}.deprecated{text-decoration:line-through!important}.warning{background:var(--color-background-warning);color:var(--color-warning-text);padding:1rem}.tsd-kind-project{color:var(--color-ts-project)}.tsd-kind-module{color:var(--color-ts-module)}.tsd-kind-namespace{color:var(--color-ts-namespace)}.tsd-kind-enum{color:var(--color-ts-enum)}.tsd-kind-enum-member{color:var(--color-ts-enum-member)}.tsd-kind-variable{color:var(--color-ts-variable)}.tsd-kind-function{color:var(--color-ts-function)}.tsd-kind-class{color:var(--color-ts-class)}.tsd-kind-interface{color:var(--color-ts-interface)}.tsd-kind-constructor{color:var(--color-ts-constructor)}.tsd-kind-property{color:var(--color-ts-property)}.tsd-kind-method{color:var(--color-ts-method)}.tsd-kind-call-signature{color:var(--color-ts-call-signature)}.tsd-kind-index-signature{color:var(--color-ts-index-signature)}.tsd-kind-constructor-signature{color:var(--color-ts-constructor-signature)}.tsd-kind-parameter{color:var(--color-ts-parameter)}.tsd-kind-type-literal{color:var(--color-ts-type-literal)}.tsd-kind-type-parameter{color:var(--color-ts-type-parameter)}.tsd-kind-accessor{color:var(--color-ts-accessor)}.tsd-kind-get-signature{color:var(--color-ts-get-signature)}.tsd-kind-set-signature{color:var(--color-ts-set-signature)}.tsd-kind-type-alias{color:var(--color-ts-type-alias)}.tsd-kind-icon~span{color:var(--color-text)}*{scrollbar-color:var(--color-accent) var(--color-icon-background);scrollbar-width:thin}::-webkit-scrollbar{width:.75rem}::-webkit-scrollbar-track{background:var(--color-icon-background)}::-webkit-scrollbar-thumb{background-color:var(--color-accent);border:.25rem solid var(--color-icon-background);border-radius:999rem}@media (max-width:769px){.tsd-widget.menu,.tsd-widget.options{display:inline-block}.container-main{display:flex}html .col-content{float:none;max-width:100%;width:100%}html .col-sidebar{-webkit-overflow-scrolling:touch;background-color:var(--color-background);bottom:0!important;left:auto!important;overflow-y:auto;padding:1.5rem 1.5rem 0 0;position:fixed!important;right:0!important;top:0!important;transform:translate(100%);visibility:hidden;width:75vw;z-index:1024}html .col-sidebar>:last-child{padding-bottom:20px}html .overlay{background-color:rgba(0,0,0,.75);bottom:0;content:"";display:block;left:0;position:fixed;right:0;top:0;visibility:hidden;z-index:1023}.to-has-menu .overlay{animation:fade-in .4s}.to-has-menu .col-sidebar{animation:pop-in-from-right .4s}.from-has-menu .overlay{animation:fade-out .4s}.from-has-menu .col-sidebar{animation:pop-out-to-right .4s}.has-menu body{overflow:hidden}.has-menu .overlay{visibility:visible}.has-menu .col-sidebar{display:flex;flex-direction:column;gap:1.5rem;max-height:100vh;padding:1rem 2rem;transform:translate(0);visibility:visible}.has-menu .tsd-navigation{max-height:100%}#tsd-toolbar-links{display:none}.tsd-navigation .tsd-nav-link{display:flex}}@media (min-width:770px){.container-main{display:grid;grid-template-areas:"sidebar content";grid-template-columns:minmax(0,1fr) minmax(0,2fr);margin:2rem auto}.col-sidebar{grid-area:sidebar}.col-content{grid-area:content;padding:0 1rem}}@media (min-width:770px) and (max-width:1399px){.col-sidebar{max-height:calc(100vh - 2rem - 42px);overflow:auto;padding-top:1rem;position:sticky;top:42px}.site-menu{margin-top:1rem}}@media (min-width:1200px){.container-main{grid-template-areas:"sidebar content toc";grid-template-columns:minmax(0,1fr) minmax(0,2.5fr) minmax(0,20rem)}.col-sidebar{display:contents}.page-menu{grid-area:toc;padding-left:1rem}.site-menu{grid-area:sidebar;margin-top:1rem 0}.page-menu,.site-menu{max-height:calc(100vh - 2rem - 42px);overflow:auto;position:sticky;top:42px}} \ No newline at end of file + );--color-ts-parameter:var(--dark-color-ts-parameter);--color-ts-type-parameter:var(--dark-color-ts-type-parameter);--color-ts-accessor:var(--dark-color-ts-accessor);--color-ts-get-signature:var(--dark-color-ts-get-signature);--color-ts-set-signature:var(--dark-color-ts-set-signature);--color-ts-type-alias:var(--dark-color-ts-type-alias);--color-document:var(--dark-color-document);--color-note:var(--dark-color-note);--color-tip:var(--dark-color-tip);--color-important:var(--dark-color-important);--color-warning:var(--dark-color-warning);--color-caution:var(--dark-color-caution);--external-icon:var(--dark-external-icon);--color-scheme:var(--dark-color-scheme)}.tsd-accordion-summary:focus-visible svg,:focus-visible{outline:2px solid var(--color-focus-outline)}.always-visible,.always-visible .tsd-signatures{display:inherit!important}h1,h2,h3,h4,h5,h6{line-height:1.2}h1{font-size:1.875rem;margin:.67rem 0}h2{font-size:1.5rem;margin:.83rem 0}h3{font-size:1.25rem;margin:1rem 0}h4{font-size:1.05rem;margin:1.33rem 0}h5{font-size:1rem;margin:1.5rem 0}h6{font-size:.875rem;margin:2.33rem 0}dl,menu,ol,ul{margin:1em 0}dd{margin:0 0 0 34px}.container{max-width:1700px;padding:0 2rem}footer{border-top:1px solid var(--color-accent);max-height:3.5rem;padding-bottom:1rem;padding-top:1rem}footer>p{margin:0 1em}.container-main{margin:0 auto;min-height:calc(100vh - 97px - 4rem)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1;visibility:visible}to{opacity:0}}@keyframes fade-in-delayed{0%{opacity:0}33%{opacity:0}to{opacity:1}}@keyframes fade-out-delayed{0%{opacity:1;visibility:visible}66%{opacity:0}to{opacity:0}}@keyframes pop-in-from-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes pop-out-to-right{0%{transform:translate(0);visibility:visible}to{transform:translate(100%)}}body{background:var(--color-background);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;font-size:16px}a{color:var(--color-link);text-decoration:none}a:hover{text-decoration:underline}a.external[target=_blank]{background-image:var(--external-icon);background-position:top 3px right;background-repeat:no-repeat;padding-right:13px}a.tsd-anchor-link{color:var(--color-text)}code,pre{border-radius:.8em;font-family:Menlo,Monaco,Consolas,Courier New,monospace;font-size:.875rem;margin:0;padding:.2em}pre{word-wrap:break-word;border:1px solid var(--color-accent);margin-bottom:8px;padding:10px;position:relative;white-space:pre-wrap}pre code{font-size:100%;padding:0}pre>button{box-sizing:border-box;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .1s}pre:hover>button,pre>button.visible{opacity:1}blockquote{border-left:4px solid gray;margin:1em 0;padding-left:1em}.tsd-typography{line-height:1.333em}.tsd-typography ul{list-style:square;margin:0;padding:0 0 0 20px}.tsd-index-panel .tsd-typography h3,.tsd-typography .tsd-index-panel h3,.tsd-typography h4,.tsd-typography h5,.tsd-typography h6{font-size:1em}.tsd-typography h5,.tsd-typography h6{font-weight:400}.tsd-typography ol,.tsd-typography p,.tsd-typography ul{margin:1em 0}.tsd-typography table{border:none;border-collapse:collapse}.tsd-typography td,.tsd-typography th{border:1px solid var(--color-accent);padding:6px 13px}.tsd-typography thead,.tsd-typography tr:nth-child(2n){background-color:var(--color-background-secondary)}.tsd-alert{border-left:.25em solid var(--alert-color);margin-bottom:16px;padding:8px 16px}.tsd-alert blockquote>:last-child,.tsd-alert>:last-child{margin-bottom:0}.tsd-alert-title{align-items:center;color:var(--alert-color);display:inline-flex}.tsd-alert-title span{margin-left:4px}.tsd-alert-note{--alert-color:var(--color-alert-note)}.tsd-alert-tip{--alert-color:var(--color-alert-tip)}.tsd-alert-important{--alert-color:var(--color-alert-important)}.tsd-alert-warning{--alert-color:var(--color-alert-warning)}.tsd-alert-caution{--alert-color:var(--color-alert-caution)}.tsd-breadcrumb{color:var(--color-text-aside);margin:0;padding:0}.tsd-breadcrumb a{color:var(--color-text-aside);text-decoration:none}.tsd-breadcrumb a:hover{text-decoration:underline}.tsd-breadcrumb li{display:inline}.tsd-breadcrumb li:after{content:" / "}.tsd-comment-tags{display:flex;flex-direction:column}dl.tsd-comment-tag-group{align-items:center;display:flex;margin:.5em 0;overflow:hidden}dl.tsd-comment-tag-group dt{display:flex;font-size:.875em;font-weight:400;margin-right:.5em}dl.tsd-comment-tag-group dd{margin:0}code.tsd-tag{border:.1em solid var(--color-accent);font-size:70%;margin-right:.25em;padding:.25em .4em}h1 code.tsd-tag:first-of-type{margin-left:.25em}dl.tsd-comment-tag-group dd:after,dl.tsd-comment-tag-group dd:before{content:" "}dl.tsd-comment-tag-group dd pre,dl.tsd-comment-tag-group dd:after{clear:both}dl.tsd-comment-tag-group p{margin:0}.tsd-panel.tsd-comment .lead{font-size:1.1em;line-height:1.333em;margin-bottom:2em}.tsd-panel.tsd-comment .lead:last-child{margin-bottom:0}.tsd-filter-visibility h4{font-size:1rem;margin:0;padding-bottom:.5rem;padding-top:.75rem}.tsd-filter-item:not(:last-child){margin-bottom:.5rem}.tsd-filter-input{align-items:center;cursor:pointer;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:-moz-fit-content;width:fit-content}.tsd-filter-input input[type=checkbox]{cursor:pointer;height:1.5em;opacity:0;position:absolute;width:1.5em}.tsd-filter-input input[type=checkbox]:disabled{pointer-events:none}.tsd-filter-input svg{border-radius:.33em;cursor:pointer;height:1.5em;margin-right:.5em;opacity:.99;width:1.5em}.tsd-filter-input input[type=checkbox]:focus-visible+svg{outline:2px solid var(--color-focus-outline)}.tsd-checkbox-background{fill:var(--color-accent)}input[type=checkbox]:checked~svg .tsd-checkbox-checkmark{stroke:var(--color-text)}.tsd-filter-input input:disabled~svg>.tsd-checkbox-background{fill:var(--color-background);stroke:var(--color-accent);stroke-width:.25rem}.tsd-filter-input input:disabled~svg>.tsd-checkbox-checkmark{stroke:var(--color-accent)}.settings-label{display:inline-block;font-weight:700;text-transform:uppercase}.tsd-filter-visibility .settings-label{margin:.75rem 0 .5rem}.tsd-theme-toggle .settings-label{margin:.75rem .75rem 0 0}.tsd-hierarchy h4 label:hover span{text-decoration:underline}.tsd-hierarchy{list-style:square;margin:0}.tsd-hierarchy-target{font-weight:700}.tsd-hierarchy-toggle{color:var(--color-link);cursor:pointer}.tsd-full-hierarchy:not(:last-child){border-bottom:1px solid var(--color-accent);margin-bottom:1em;padding-bottom:1em}.tsd-full-hierarchy,.tsd-full-hierarchy ul{list-style:none;margin:0;padding:0}.tsd-full-hierarchy ul{padding-left:1.5rem}.tsd-full-hierarchy a{align-items:center;color:var(--color-text);display:inline-flex;font-size:1rem;padding:.25rem 0!important}.tsd-full-hierarchy svg[data-dropdown]{cursor:pointer}.tsd-full-hierarchy svg[data-dropdown=false]{transform:rotate(-90deg)}.tsd-full-hierarchy svg[data-dropdown=false]~ul{display:none}.tsd-panel-group.tsd-index-group{margin-bottom:0}.tsd-index-panel .tsd-index-list{column-gap:1rem;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:auto;line-height:1.333em;list-style:none;margin:0;overflow:hidden;padding:.25rem 0 0}@media (max-width:1024px){.tsd-index-panel .tsd-index-list{grid-template-columns:repeat(2,1fr)}}@media (max-width:768px){.tsd-index-panel .tsd-index-list{grid-template-columns:repeat(1,1fr)}}.tsd-index-panel .tsd-index-list li{-webkit-page-break-inside:avoid;-moz-page-break-inside:avoid;-ms-page-break-inside:avoid;-o-page-break-inside:avoid;page-break-inside:avoid}.tsd-flag{background-color:var(--color-comment-tag);border-radius:4px;color:var(--color-comment-tag-text);display:inline-block;font-size:75%;font-weight:400;line-height:1;padding:.25em .4em;text-indent:0}.tsd-anchor{top:-100px}.tsd-anchor,.tsd-member{position:relative}.tsd-member .tsd-anchor+h3{align-items:center;border-bottom:none;display:flex;margin-bottom:0;margin-top:0}.tsd-navigation.settings{margin:1rem 0}.tsd-navigation .tsd-accordion-summary,.tsd-navigation>a{align-items:center;display:flex;width:calc(100% - .25rem)}.tsd-navigation a,.tsd-navigation summary>span,.tsd-page-navigation a{align-items:center;box-sizing:border-box;color:var(--color-text);display:flex;padding:.25rem;text-decoration:none;width:calc(100% - .25rem)}.tsd-navigation a.current,.tsd-page-navigation a.current{background:var(--color-active-menu-item)}.tsd-navigation a:hover,.tsd-page-navigation a:hover{text-decoration:underline}.tsd-navigation ul,.tsd-page-navigation ul{list-style:none;margin-bottom:0;margin-top:0;padding:0}.tsd-navigation li,.tsd-page-navigation li{max-width:100%;padding:0}.tsd-navigation .tsd-nav-link{display:none}.tsd-nested-navigation{margin-left:3rem}.tsd-nested-navigation>li>details{margin-left:-1.5rem}.tsd-small-nested-navigation{margin-left:1.5rem}.tsd-small-nested-navigation>li>details{margin-left:-1.5rem}.tsd-page-navigation-section{margin-left:10px}.tsd-page-navigation-section>summary{padding:.25rem}.tsd-page-navigation-section>div{margin-left:20px}.tsd-page-navigation ul{padding-left:1.75rem}#tsd-sidebar-links a{line-height:1.25rem;margin-bottom:.5rem;margin-top:0}#tsd-sidebar-links a:last-of-type{margin-bottom:0}a.tsd-index-link{align-items:center;color:var(--color-text);display:inline-flex;font-size:1rem;line-height:1.25rem;padding:.25rem 0!important}.tsd-accordion-summary{list-style-type:none;outline:none}.tsd-accordion-summary::-webkit-details-marker{display:none}.tsd-accordion-summary,.tsd-accordion-summary a{cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.tsd-accordion-summary a{width:calc(100% - 1.5rem)}.tsd-accordion-summary>*{margin-bottom:0;margin-top:0;padding-bottom:0;padding-top:0}.tsd-accordion .tsd-accordion-summary>svg{margin-left:.25rem;vertical-align:text-top}.tsd-accordion:not([open])>.tsd-accordion-summary>h1>svg:first-child,.tsd-accordion:not([open])>.tsd-accordion-summary>h2>svg:first-child,.tsd-accordion:not([open])>.tsd-accordion-summary>h3>svg:first-child,.tsd-accordion:not([open])>.tsd-accordion-summary>h4>svg:first-child,.tsd-accordion:not([open])>.tsd-accordion-summary>svg:first-child{transform:rotate(-90deg)}.tsd-index-content>:not(:first-child){margin-top:.75rem}.tsd-index-heading{margin-bottom:.75rem;margin-top:1.5rem}.tsd-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tsd-kind-icon{height:1.25rem;margin-right:.5rem;min-height:1.25rem;min-width:1.25rem;width:1.25rem}.tsd-signature>.tsd-kind-icon{margin-right:.8rem}.tsd-panel{margin-bottom:2.5rem}.tsd-panel.tsd-member{margin-bottom:4rem}.tsd-panel:empty{display:none}.tsd-panel>h1,.tsd-panel>h2,.tsd-panel>h3{margin:1.5rem -1.5rem .75rem;padding:0 1.5rem .75rem}.tsd-panel>h1.tsd-before-signature,.tsd-panel>h2.tsd-before-signature,.tsd-panel>h3.tsd-before-signature{border-bottom:none;margin-bottom:0}.tsd-panel-group,.tsd-panel-group.tsd-index-group,.tsd-panel-group.tsd-index-group details{margin:2rem 0}.tsd-panel-group>.tsd-accordion-summary{margin-bottom:1rem}#tsd-search{transition:background-color .2s}#tsd-search .title{position:relative;z-index:2}#tsd-search .field{height:100%;left:0;position:absolute;right:2.5rem;top:0}#tsd-search .field input{background:transparent;border:0;box-sizing:border-box;color:var(--color-text);opacity:0;outline:0;padding:0 10px;position:relative;top:-50px;width:100%;z-index:1}#tsd-search .field label{overflow:hidden;position:absolute;right:-40px}#tsd-search .field input,#tsd-search .title,#tsd-toolbar-links a{transition:opacity .2s}#tsd-search .results{box-shadow:0 0 4px rgba(0,0,0,.25);list-style:none;margin:0;padding:0;position:absolute;top:40px;visibility:hidden;width:100%}#tsd-search .results li{background-color:var(--color-background);line-height:normal;padding:4px}#tsd-search .results li:nth-child(2n){background-color:var(--color-background-secondary)}#tsd-search .results li.state{display:none}#tsd-search .results li.current:not(.no-results),#tsd-search .results li:hover:not(.no-results){background-color:var(--color-accent)}#tsd-search .results a{align-items:center;box-sizing:border-box;display:flex;padding:.25rem}#tsd-search .results a:before{top:10px}#tsd-search .results span.parent{color:var(--color-text-aside);font-weight:400}#tsd-search.has-focus{background-color:var(--color-accent)}#tsd-search.has-focus .field input{opacity:1;top:0}#tsd-search.has-focus #tsd-toolbar-links a,#tsd-search.has-focus .title{opacity:0;z-index:0}#tsd-search.has-focus .results{visibility:visible}#tsd-search.failure .results li.state.failure,#tsd-search.loading .results li.state.loading{display:block}#tsd-toolbar-links{align-items:center;display:flex;height:100%;justify-content:flex-end;position:absolute;right:2rem;top:0}#tsd-toolbar-links a{margin-left:1.5rem}#tsd-toolbar-links a:hover{text-decoration:underline}.tsd-signature{border:1px solid var(--color-accent);font-family:Menlo,Monaco,Consolas,Courier New,monospace;font-size:14px;margin:0 0 1rem;overflow-x:auto;padding:1rem .5rem}.tsd-signature-keyword{color:var(--color-ts-keyword);font-weight:400}.tsd-signature-symbol{color:var(--color-text-aside);font-weight:400}.tsd-signature-type{font-style:italic;font-weight:400}.tsd-signatures{list-style-type:none;margin:0 0 1em;padding:0}.tsd-signatures .tsd-signature{border-color:var(--color-accent);border-width:1px 0;margin:0;transition:background-color .1s}.tsd-signatures .tsd-index-signature:not(:last-child){margin-bottom:1em}.tsd-description .tsd-signatures .tsd-signature,.tsd-signatures .tsd-index-signature .tsd-signature{border-width:1px}ul.tsd-parameter-list,ul.tsd-type-parameter-list{list-style:square;margin:0;padding-left:20px}ul.tsd-parameter-list>li.tsd-parameter-signature,ul.tsd-type-parameter-list>li.tsd-parameter-signature{list-style:none;margin-left:-20px}ul.tsd-parameter-list h5,ul.tsd-type-parameter-list h5{font-size:16px;margin:1em 0 .5em}.tsd-sources{font-size:.875em;margin-top:1rem}.tsd-sources a{color:var(--color-text-aside);text-decoration:underline}.tsd-sources ul{list-style:none;padding:0}.tsd-page-toolbar{background:var(--color-background-secondary);border-bottom:1px solid var(--color-accent);color:var(--color-text);left:0;position:sticky;top:0;transition:transform .3s ease-in-out;width:100%;z-index:1}.tsd-page-toolbar a{color:var(--color-text);text-decoration:none}.tsd-page-toolbar a.title{font-weight:700}.tsd-page-toolbar a.title:hover{text-decoration:underline}.tsd-page-toolbar .tsd-toolbar-contents{display:flex;height:2.5rem;justify-content:space-between;margin:0 auto}.tsd-page-toolbar .table-cell{line-height:40px;position:relative;white-space:nowrap}.tsd-page-toolbar .table-cell:first-child{width:100%}.tsd-page-toolbar .tsd-toolbar-icon{box-sizing:border-box;line-height:0;padding:12px 0}.tsd-widget{cursor:pointer;display:inline-block;height:40px;opacity:.8;overflow:hidden;transition:opacity .1s,background-color .2s;vertical-align:bottom}.tsd-widget:hover{opacity:.9}.tsd-widget.active{background-color:var(--color-accent);opacity:1}.tsd-widget.no-caption{width:40px}.tsd-widget.no-caption:before{margin:0}.tsd-widget.menu,.tsd-widget.options{display:none}input[type=checkbox]+.tsd-widget:before{background-position:-120px 0}input[type=checkbox]:checked+.tsd-widget:before{background-position:-160px 0}img{max-width:100%}.tsd-member-summary-name{align-items:center;display:inline-flex;padding:.25rem;text-decoration:none}.tsd-anchor-icon{align-items:center;color:var(--color-text);display:inline-flex;margin-left:.5rem}.tsd-anchor-icon svg{height:1em;visibility:hidden;width:1em}.tsd-anchor-link:hover>.tsd-anchor-icon svg,.tsd-member-summary-name:hover>.tsd-anchor-icon svg{visibility:visible}.deprecated{text-decoration:line-through!important}.warning{background:var(--color-background-warning);color:var(--color-warning-text);padding:1rem}.tsd-kind-project{color:var(--color-ts-project)}.tsd-kind-module{color:var(--color-ts-module)}.tsd-kind-namespace{color:var(--color-ts-namespace)}.tsd-kind-enum{color:var(--color-ts-enum)}.tsd-kind-enum-member{color:var(--color-ts-enum-member)}.tsd-kind-variable{color:var(--color-ts-variable)}.tsd-kind-function{color:var(--color-ts-function)}.tsd-kind-class{color:var(--color-ts-class)}.tsd-kind-interface{color:var(--color-ts-interface)}.tsd-kind-constructor{color:var(--color-ts-constructor)}.tsd-kind-property{color:var(--color-ts-property)}.tsd-kind-method{color:var(--color-ts-method)}.tsd-kind-reference{color:var(--color-ts-reference)}.tsd-kind-call-signature{color:var(--color-ts-call-signature)}.tsd-kind-index-signature{color:var(--color-ts-index-signature)}.tsd-kind-constructor-signature{color:var(--color-ts-constructor-signature)}.tsd-kind-parameter{color:var(--color-ts-parameter)}.tsd-kind-type-parameter{color:var(--color-ts-type-parameter)}.tsd-kind-accessor{color:var(--color-ts-accessor)}.tsd-kind-get-signature{color:var(--color-ts-get-signature)}.tsd-kind-set-signature{color:var(--color-ts-set-signature)}.tsd-kind-type-alias{color:var(--color-ts-type-alias)}.tsd-kind-icon~span{color:var(--color-text)}*{scrollbar-color:var(--color-accent) var(--color-icon-background);scrollbar-width:thin}::-webkit-scrollbar{width:.75rem}::-webkit-scrollbar-track{background:var(--color-icon-background)}::-webkit-scrollbar-thumb{background-color:var(--color-accent);border:.25rem solid var(--color-icon-background);border-radius:999rem}@media (max-width:769px){.tsd-widget.menu,.tsd-widget.options{display:inline-block}.container-main{display:flex}html .col-content{float:none;max-width:100%;width:100%}html .col-sidebar{-webkit-overflow-scrolling:touch;background-color:var(--color-background);bottom:0!important;left:auto!important;overflow-y:auto;padding:1.5rem 1.5rem 0 0;position:fixed!important;right:0!important;top:0!important;transform:translate(100%);visibility:hidden;width:75vw;z-index:1024}html .col-sidebar>:last-child{padding-bottom:20px}html .overlay{background-color:rgba(0,0,0,.75);bottom:0;content:"";display:block;left:0;position:fixed;right:0;top:0;visibility:hidden;z-index:1023}.to-has-menu .overlay{animation:fade-in .4s}.to-has-menu .col-sidebar{animation:pop-in-from-right .4s}.from-has-menu .overlay{animation:fade-out .4s}.from-has-menu .col-sidebar{animation:pop-out-to-right .4s}.has-menu body{overflow:hidden}.has-menu .overlay{visibility:visible}.has-menu .col-sidebar{display:flex;flex-direction:column;gap:1.5rem;max-height:100vh;padding:1rem 2rem;transform:translate(0);visibility:visible}.has-menu .tsd-navigation{max-height:100%}#tsd-toolbar-links{display:none}.tsd-navigation .tsd-nav-link{display:flex}}@media (min-width:770px){.container-main{display:grid;grid-template-areas:"sidebar content";grid-template-columns:minmax(0,1fr) minmax(0,2fr);margin:2rem auto}.col-sidebar{grid-area:sidebar}.col-content{grid-area:content;padding:0 1rem}}@media (min-width:770px) and (max-width:1399px){.col-sidebar{max-height:calc(100vh - 2rem - 42px);overflow:auto;padding-top:1rem;position:sticky;top:42px}.site-menu{margin-top:1rem}}@media (min-width:1200px){.container-main{grid-template-areas:"sidebar content toc";grid-template-columns:minmax(0,1fr) minmax(0,2.5fr) minmax(0,20rem)}.col-sidebar{display:contents}.page-menu{grid-area:toc;padding-left:1rem}.site-menu{grid-area:sidebar;margin-top:1rem}.page-menu,.site-menu{max-height:calc(100vh - 2rem - 42px);overflow:auto;position:sticky;top:42px}}} \ No newline at end of file diff --git a/classes/Context.html b/classes/Context.html index 72b1acc2..258f7d37 100644 --- a/classes/Context.html +++ b/classes/Context.html @@ -1,3 +1,3 @@ -Context | zeromq.js

Class Context

A ØMQ context. Contexts manage the background I/O to send and receive messages of their associated sockets.

It is usually not necessary to instantiate a new context - the global context is used for new sockets by default. The global context is the only context that is shared between threads (when using worker_threads). Custom contexts can only be used in the same thread.

// Use default context (recommended).
const socket = new Dealer() +Context | zeromq.js

Class Context

A ØMQ context. Contexts manage the background I/O to send and receive messages of their associated sockets.

It is usually not necessary to instantiate a new context - the global context is used for new sockets by default. The global context is the only context that is shared between threads (when using worker_threads). Custom contexts can only be used in the same thread.

// Use default context (recommended).
const socket = new Dealer()
// Use custom context.
const context = new Context()
const socket = new Dealer({context}) -

Note: By default all contexts (including the global context) will prevent the process from terminating if there are any messages in an outgoing queue, even if the associated socket was closed. For some applications this is unnecessary or unwanted. Consider setting Context.blocky to false or setting Socket.linger for each new socket.

Constructors

  • Creates a new ØMQ context and sets any provided context options. Sockets need to be explicitly associated with a new context during construction.

    Parameters

    • Optionaloptions: {
          blocky?: boolean;
          ioThreads?: number;
          ipv6?: boolean;
          maxMessageSize?: number;
          maxSockets?: number;
          threadPriority?: number;
          threadSchedulingPolicy?: number;
      }

      An optional object with options that will be set on the context during creation.

      • Optionalblocky?: boolean

        ZMQ_BLOCKY

        By default the context will block forever when closed at process exit. The assumption behind this behavior is that abrupt termination will cause message loss. Most real applications use some form of handshaking to ensure applications receive termination messages, and then terminate the context with Socket.linger set to zero on all sockets. This setting is an easier way to get the same result. When blocky is set to false, all new sockets are given a linger timeout of zero. You must still close all sockets before exiting.

      • OptionalioThreads?: number

        ZMQ_IO_THREADS

        Size of the ØMQ thread pool to handle I/O operations. If your application is using only the inproc transport for messaging you may set this to zero, otherwise set it to at least one (default).

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, a socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • OptionalmaxMessageSize?: number

        ZMQ_MAX_MSGSZ

        Maximum allowed size of a message sent in the context.

      • OptionalmaxSockets?: number

        ZMQ_MAX_SOCKETS

        Maximum number of sockets allowed on the context.

      • OptionalthreadPriority?: number

        ZMQ_THREAD_PRIORITY

        Scheduling priority for internal context's thread pool. This option is not available on Windows. Supported values for this option depend on chosen scheduling policy. Details can be found at http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html. This option only applies before creating any sockets on the context.

      • OptionalthreadSchedulingPolicy?: number

        ZMQ_THREAD_SCHED_POLICY

        Scheduling policy for internal context's thread pool. This option is not available on Windows. Supported values for this option can be found at http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html. This option only applies before creating any sockets on the context.

    Returns Context

Properties

blocky: boolean

ZMQ_BLOCKY

By default the context will block forever when closed at process exit. The assumption behind this behavior is that abrupt termination will cause message loss. Most real applications use some form of handshaking to ensure applications receive termination messages, and then terminate the context with Socket.linger set to zero on all sockets. This setting is an easier way to get the same result. When blocky is set to false, all new sockets are given a linger timeout of zero. You must still close all sockets before exiting.

ioThreads: number

ZMQ_IO_THREADS

Size of the ØMQ thread pool to handle I/O operations. If your application is using only the inproc transport for messaging you may set this to zero, otherwise set it to at least one (default).

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, a socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

maxMessageSize: number

ZMQ_MAX_MSGSZ

Maximum allowed size of a message sent in the context.

maxSockets: number

ZMQ_MAX_SOCKETS

Maximum number of sockets allowed on the context.

maxSocketsLimit: number

ZMQ_SOCKET_LIMIT

Largest number of sockets that can be set with maxSockets.

threadPriority: number

ZMQ_THREAD_PRIORITY

Scheduling priority for internal context's thread pool. This option is not available on Windows. Supported values for this option depend on chosen scheduling policy. Details can be found at http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html. This option only applies before creating any sockets on the context.

threadSchedulingPolicy: number

ZMQ_THREAD_SCHED_POLICY

Scheduling policy for internal context's thread pool. This option is not available on Windows. Supported values for this option can be found at http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html. This option only applies before creating any sockets on the context.

Methods

  • Parameters

    • option: number

    Returns boolean

  • Parameters

    • option: number

    Returns number

  • Parameters

    • option: number
    • value: boolean

    Returns void

  • Parameters

    • option: number
    • value: number

    Returns void

\ No newline at end of file +

Note: By default all contexts (including the global context) will prevent the process from terminating if there are any messages in an outgoing queue, even if the associated socket was closed. For some applications this is unnecessary or unwanted. Consider setting Context.blocky to false or setting Socket.linger for each new socket.

Constructors

  • Creates a new ØMQ context and sets any provided context options. Sockets need to be explicitly associated with a new context during construction.

    Parameters

    • Optionaloptions: {
          blocky?: boolean;
          ioThreads?: number;
          ipv6?: boolean;
          maxMessageSize?: number;
          maxSockets?: number;
          threadPriority?: number;
          threadSchedulingPolicy?: number;
      }

      An optional object with options that will be set on the context during creation.

      • Optionalblocky?: boolean

        ZMQ_BLOCKY

        By default the context will block forever when closed at process exit. The assumption behind this behavior is that abrupt termination will cause message loss. Most real applications use some form of handshaking to ensure applications receive termination messages, and then terminate the context with Socket.linger set to zero on all sockets. This setting is an easier way to get the same result. When blocky is set to false, all new sockets are given a linger timeout of zero. You must still close all sockets before exiting.

      • OptionalioThreads?: number

        ZMQ_IO_THREADS

        Size of the ØMQ thread pool to handle I/O operations. If your application is using only the inproc transport for messaging you may set this to zero, otherwise set it to at least one (default).

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, a socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • OptionalmaxMessageSize?: number

        ZMQ_MAX_MSGSZ

        Maximum allowed size of a message sent in the context.

      • OptionalmaxSockets?: number

        ZMQ_MAX_SOCKETS

        Maximum number of sockets allowed on the context.

      • OptionalthreadPriority?: number

        ZMQ_THREAD_PRIORITY

        Scheduling priority for internal context's thread pool. This option is not available on Windows. Supported values for this option depend on chosen scheduling policy. Details can be found at http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html. This option only applies before creating any sockets on the context.

      • OptionalthreadSchedulingPolicy?: number

        ZMQ_THREAD_SCHED_POLICY

        Scheduling policy for internal context's thread pool. This option is not available on Windows. Supported values for this option can be found at http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html. This option only applies before creating any sockets on the context.

    Returns Context

Properties

blocky: boolean

ZMQ_BLOCKY

By default the context will block forever when closed at process exit. The assumption behind this behavior is that abrupt termination will cause message loss. Most real applications use some form of handshaking to ensure applications receive termination messages, and then terminate the context with Socket.linger set to zero on all sockets. This setting is an easier way to get the same result. When blocky is set to false, all new sockets are given a linger timeout of zero. You must still close all sockets before exiting.

ioThreads: number

ZMQ_IO_THREADS

Size of the ØMQ thread pool to handle I/O operations. If your application is using only the inproc transport for messaging you may set this to zero, otherwise set it to at least one (default).

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, a socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

maxMessageSize: number

ZMQ_MAX_MSGSZ

Maximum allowed size of a message sent in the context.

maxSockets: number

ZMQ_MAX_SOCKETS

Maximum number of sockets allowed on the context.

maxSocketsLimit: number

ZMQ_SOCKET_LIMIT

Largest number of sockets that can be set with maxSockets.

threadPriority: number

ZMQ_THREAD_PRIORITY

Scheduling priority for internal context's thread pool. This option is not available on Windows. Supported values for this option depend on chosen scheduling policy. Details can be found at http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html. This option only applies before creating any sockets on the context.

threadSchedulingPolicy: number

ZMQ_THREAD_SCHED_POLICY

Scheduling policy for internal context's thread pool. This option is not available on Windows. Supported values for this option can be found at http://man7.org/linux/man-pages/man2/sched_setscheduler.2.html. This option only applies before creating any sockets on the context.

Methods

  • Parameters

    • option: number

    Returns boolean

  • Parameters

    • option: number

    Returns number

  • Parameters

    • option: number
    • value: boolean

    Returns void

  • Parameters

    • option: number
    • value: number

    Returns void

\ No newline at end of file diff --git a/classes/Dealer.html b/classes/Dealer.html index 3d5bf151..7bc3cfe8 100644 --- a/classes/Dealer.html +++ b/classes/Dealer.html @@ -1,8 +1,9 @@ -Dealer | zeromq.js

Class Dealer

A Dealer socket can be used to extend request/reply sockets. Each message sent is round-robined among all connected peers, and each message received is fair-queued from all connected peers.

When a Dealer socket enters the mute state due to having reached the high water mark for all peers, or if there are no peers at all, then any Writable.send() operations on the socket shall block until the mute state ends or at least one peer becomes available for sending; messages are not discarded.

When a Dealer is connected to a Reply socket, each message sent must consist of an empty message part, the delimiter, followed by one or more body parts.

Hierarchy (view full)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          conflate?: boolean;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          probeRouter?: boolean;
          rate?: number;
          receiveBufferSize?: number;
          receiveHighWaterMark?: number;
          receiveTimeout?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          routingId?: null | string;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • Optionalconflate?: boolean

        ZMQ_CONFLATE

        If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalprobeRouter?: boolean

        ZMQ_PROBE_ROUTER

        When set to true, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on sockets connected to a Router socket. The application must filter such empty messages. This option provides the Router with an event signaling the arrival of a new peer.

        Warning:* Do not set this option on a socket that talks to any other socket type except Router: the results are undefined.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreceiveBufferSize?: number

        ZMQ_RCVBUF

        Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalreceiveHighWaterMark?: number

        ZMQ_RCVHWM

        The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalreceiveTimeout?: number

        ZMQ_RCVTIMEO

        Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalroutingId?: null | string

        ZMQ_ROUTING_ID

        The identity of the specified socket when connecting to a Router socket.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Dealer

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

conflate: boolean

ZMQ_CONFLATE

If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

probeRouter: boolean

ZMQ_PROBE_ROUTER

When set to true, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on sockets connected to a Router socket. The application must filter such empty messages. This option provides the Router with an event signaling the arrival of a new peer.

Warning:* Do not set this option on a socket that talks to any other socket type except Router: the results are undefined.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

receiveBufferSize: number

ZMQ_RCVBUF

Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

receiveHighWaterMark: number

ZMQ_RCVHWM

The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

receiveTimeout: number

ZMQ_RCVTIMEO

Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

routingId: null | string

ZMQ_ROUTING_ID

The identity of the specified socket when connecting to a Router socket.

securityMechanism:
    | null
    | "plain"
    | "curve"
    | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

    for await (const [msg] of socket) {
    // handle messages
    } -

    Returns AsyncIterator<Buffer[], undefined, undefined>

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port -

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

    const [msg] = await socket.receive()
    const [part1, part2] = await socket.receive() -

    Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

    A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

    Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

    socket.receive() // -> pending promise until read is possible
    socket.receive() // -> promise rejection with `EBUSY` error -

    Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

    Returns Promise<Buffer[]>

    Resolved with message parts that were successfully read.

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) -

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • Rest...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

\ No newline at end of file +Dealer | zeromq.js

Class Dealer

A Dealer socket can be used to extend request/reply sockets. Each message sent is round-robined among all connected peers, and each message received is fair-queued from all connected peers.

When a Dealer socket enters the mute state due to having reached the high water mark for all peers, or if there are no peers at all, then any Writable.send() operations on the socket shall block until the mute state ends or at least one peer becomes available for sending; messages are not discarded.

When a Dealer is connected to a Reply socket, each message sent must consist of an empty message part, the delimiter, followed by one or more body parts.

Hierarchy (View Summary)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          conflate?: boolean;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          probeRouter?: boolean;
          rate?: number;
          receiveBufferSize?: number;
          receiveHighWaterMark?: number;
          receiveTimeout?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          routingId?: null | string;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • Optionalconflate?: boolean

        ZMQ_CONFLATE

        If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalprobeRouter?: boolean

        ZMQ_PROBE_ROUTER

        When set to true, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on sockets connected to a Router socket. The application must filter such empty messages. This option provides the Router with an event signaling the arrival of a new peer.

        Warning:* Do not set this option on a socket that talks to any other socket type except Router: the results are undefined.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreceiveBufferSize?: number

        ZMQ_RCVBUF

        Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalreceiveHighWaterMark?: number

        ZMQ_RCVHWM

        The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalreceiveTimeout?: number

        ZMQ_RCVTIMEO

        Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalroutingId?: null | string

        ZMQ_ROUTING_ID

        The identity of the specified socket when connecting to a Router socket.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Dealer

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

conflate: boolean

ZMQ_CONFLATE

If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

probeRouter: boolean

ZMQ_PROBE_ROUTER

When set to true, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on sockets connected to a Router socket. The application must filter such empty messages. This option provides the Router with an event signaling the arrival of a new peer.

Warning:* Do not set this option on a socket that talks to any other socket type except Router: the results are undefined.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

receiveBufferSize: number

ZMQ_RCVBUF

Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

receiveHighWaterMark: number

ZMQ_RCVHWM

The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

receiveTimeout: number

ZMQ_RCVTIMEO

Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

routingId: null | string

ZMQ_ROUTING_ID

The identity of the specified socket when connecting to a Router socket.

securityMechanism: null | "plain" | "curve" | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

    for await (const [msg] of socket) {
    // handle messages
    } +

    Returns AsyncIterator<Buffer[]>

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    socket.bindSync("tcp://127.0.0.1:3456")
    socket.bindSync("tcp://*:3456") // binds on all interfaces
    socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns void

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

    const [msg] = await socket.receive()
    const [part1, part2] = await socket.receive() +

    Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

    A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

    Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

    socket.receive() // -> pending promise until read is possible
    socket.receive() // -> promise rejection with `EBUSY` error +

    Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

    Returns Promise<Buffer[]>

    Resolved with message parts that were successfully read.

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) +

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • ...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Parameters

    • option: number
    • value: boolean

    Returns void

  • Parameters

    • option: number
    • value: null | string | Buffer

    Returns void

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns void

    Resolved when the socket was successfully unbound.

\ No newline at end of file diff --git a/classes/Observer.html b/classes/Observer.html index b4a21677..bbd0d805 100644 --- a/classes/Observer.html +++ b/classes/Observer.html @@ -1,5 +1,5 @@ -Observer | zeromq.js

Class Observer

An event observer for ØMQ sockets. This starts up a ZMQ monitoring socket internally that receives all socket events. The event observer can be used in one of two ways, which are mutually exclusive: with receive() or with event listeners attached with on().

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

  • Creates a new ØMQ observer. It should not be necessary to instantiate a new observer. Access an existing observer for a socket with Socket.events.

    const socket = new Publisher()
    const events = socket.events -

    Parameters

    • socket: Socket

      The socket to observe.

    Returns Observer

Properties

closed: boolean

Whether the observer was closed, either manually or because the associated socket was closed.

Methods

  • Asynchronously iterate over socket events. When the socket is closed or when the observer is closed manually with Observer.close(), the iterator will return.

    for await (event of socket.events) {
    switch (event.type) {
    case "bind":
    console.log(`Socket bound to ${event.address}`)
    break
    // ...
    }
    } -

    Returns AsyncIterator<Event, undefined, undefined>

  • Closes the observer. Afterwards no new events will be received or emitted. Calling this method is optional.

    Returns void

  • Removes the specified listener function from the list of functions to call when the given event is observed.

    Type Parameters

    • E extends
          | "unknown"
          | "connect"
          | "disconnect"
          | "close"
          | "end"
          | "accept"
          | "accept:error"
          | "bind"
          | "bind:error"
          | "connect:delay"
          | "connect:retry"
          | "close:error"
          | "handshake"
          | "handshake:error:protocol"
          | "handshake:error:auth"
          | "handshake:error:other"

    Parameters

    • type: E

      The type of event that the listener was listening for.

    • listener: ((data: EventOfType<E>) => void)

      The previously registered listener function.

    Returns EventSubscriber

  • Adds a listener function which will be invoked when the given event type is observed. Calling this method will convert the Observer to event emitter mode, which will make it impossible to call Observer.receive() at the same time.

    socket.events.on("bind", event => {
    console.log(`Socket bound to ${event.address}`)
    // ...
    }) -

    Type Parameters

    • E extends
          | "unknown"
          | "connect"
          | "disconnect"
          | "close"
          | "end"
          | "accept"
          | "accept:error"
          | "bind"
          | "bind:error"
          | "connect:delay"
          | "connect:retry"
          | "close:error"
          | "handshake"
          | "handshake:error:protocol"
          | "handshake:error:auth"
          | "handshake:error:other"

    Parameters

    • type: E

      The type of event to listen for.

    • listener: ((data: EventOfType<E>) => void)

      The listener function that will be called with all event data when the event is observed.

    Returns EventSubscriber

  • Waits for the next event to become availeble on the observer. Reads an event immediately if possible. If no events are queued, it will wait asynchonously. The promise will be resolved with the next event when available.

    When reading events with receive() the observer may not be in event emitter mode. Avoid mixing calls to receive() with event handlers via attached with on().

    for await (event of socket.events) {
    switch (event.type) {
    case "bind":
    console.log(`Socket bound to ${event.address}`)
    break
    // ...
    }
    } -

    Returns Promise<Event>

    Resolved with the next event and its details. See Event.

\ No newline at end of file +Observer | zeromq.js

Class Observer

An event observer for ØMQ sockets. This starts up a ZMQ monitoring socket internally that receives all socket events. The event observer can be used in one of two ways, which are mutually exclusive: with receive() or with event listeners attached with on().

Hierarchy (View Summary)

Constructors

Properties

Methods

Constructors

  • Creates a new ØMQ observer. It should not be necessary to instantiate a new observer. Access an existing observer for a socket with Socket.events.

    const socket = new Publisher()
    const events = socket.events +

    Parameters

    • socket: Socket

      The socket to observe.

    Returns Observer

Properties

closed: boolean

Whether the observer was closed, either manually or because the associated socket was closed.

Methods

  • Asynchronously iterate over socket events. When the socket is closed or when the observer is closed manually with Observer.close(), the iterator will return.

    for await (event of socket.events) {
    switch (event.type) {
    case "bind":
    console.log(`Socket bound to ${event.address}`)
    break
    // ...
    }
    } +

    Returns AsyncIterator<Event>

  • Closes the observer. Afterwards no new events will be received or emitted. Calling this method is optional.

    Returns void

  • Removes the specified listener function from the list of functions to call when the given event is observed.

    Type Parameters

    • E extends
          | "unknown"
          | "connect"
          | "disconnect"
          | "close"
          | "end"
          | "accept"
          | "accept:error"
          | "bind"
          | "bind:error"
          | "connect:delay"
          | "connect:retry"
          | "close:error"
          | "handshake"
          | "handshake:error:protocol"
          | "handshake:error:auth"
          | "handshake:error:other"

    Parameters

    • type: E

      The type of event that the listener was listening for.

    • listener: (data: EventOfType<E>) => void

      The previously registered listener function.

    Returns EventSubscriber

  • Adds a listener function which will be invoked when the given event type is observed. Calling this method will convert the Observer to event emitter mode, which will make it impossible to call Observer.receive() at the same time.

    socket.events.on("bind", event => {
    console.log(`Socket bound to ${event.address}`)
    // ...
    }) +

    Type Parameters

    • E extends
          | "unknown"
          | "connect"
          | "disconnect"
          | "close"
          | "end"
          | "accept"
          | "accept:error"
          | "bind"
          | "bind:error"
          | "connect:delay"
          | "connect:retry"
          | "close:error"
          | "handshake"
          | "handshake:error:protocol"
          | "handshake:error:auth"
          | "handshake:error:other"

    Parameters

    • type: E

      The type of event to listen for.

    • listener: (data: EventOfType<E>) => void

      The listener function that will be called with all event data when the event is observed.

    Returns EventSubscriber

  • Waits for the next event to become availeble on the observer. Reads an event immediately if possible. If no events are queued, it will wait asynchonously. The promise will be resolved with the next event when available.

    When reading events with receive() the observer may not be in event emitter mode. Avoid mixing calls to receive() with event handlers via attached with on().

    for await (event of socket.events) {
    switch (event.type) {
    case "bind":
    console.log(`Socket bound to ${event.address}`)
    break
    // ...
    }
    } +

    Returns Promise<Event>

    Resolved with the next event and its details. See Event.

\ No newline at end of file diff --git a/classes/Pair.html b/classes/Pair.html index 049da3f8..ef5dab3d 100644 --- a/classes/Pair.html +++ b/classes/Pair.html @@ -1,8 +1,9 @@ -Pair | zeromq.js

Class Pair

A Pair socket can only be connected to one other Pair at any one time. No message routing or filtering is performed on any messages.

When a Pair socket enters the mute state due to having reached the high water mark for the connected peer, or if no peer is connected, then any Writable.send() operations on the socket shall block until the peer becomes available for sending; messages are not discarded.

While Pair sockets can be used over transports other than inproc://, their inability to auto-reconnect coupled with the fact new incoming connections will be terminated while any previous connections (including ones in a closing state) exist makes them unsuitable for tcp:// in most cases.

Hierarchy (view full)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          rate?: number;
          receiveBufferSize?: number;
          receiveHighWaterMark?: number;
          receiveTimeout?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreceiveBufferSize?: number

        ZMQ_RCVBUF

        Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalreceiveHighWaterMark?: number

        ZMQ_RCVHWM

        The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalreceiveTimeout?: number

        ZMQ_RCVTIMEO

        Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Pair

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

receiveBufferSize: number

ZMQ_RCVBUF

Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

receiveHighWaterMark: number

ZMQ_RCVHWM

The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

receiveTimeout: number

ZMQ_RCVTIMEO

Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

securityMechanism:
    | null
    | "plain"
    | "curve"
    | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

    for await (const [msg] of socket) {
    // handle messages
    } -

    Returns AsyncIterator<Buffer[], undefined, undefined>

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port -

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

    const [msg] = await socket.receive()
    const [part1, part2] = await socket.receive() -

    Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

    A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

    Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

    socket.receive() // -> pending promise until read is possible
    socket.receive() // -> promise rejection with `EBUSY` error -

    Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

    Returns Promise<Buffer[]>

    Resolved with message parts that were successfully read.

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) -

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • Rest...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

\ No newline at end of file +Pair | zeromq.js

Class Pair

A Pair socket can only be connected to one other Pair at any one time. No message routing or filtering is performed on any messages.

When a Pair socket enters the mute state due to having reached the high water mark for the connected peer, or if no peer is connected, then any Writable.send() operations on the socket shall block until the peer becomes available for sending; messages are not discarded.

While Pair sockets can be used over transports other than inproc://, their inability to auto-reconnect coupled with the fact new incoming connections will be terminated while any previous connections (including ones in a closing state) exist makes them unsuitable for tcp:// in most cases.

Hierarchy (View Summary)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          rate?: number;
          receiveBufferSize?: number;
          receiveHighWaterMark?: number;
          receiveTimeout?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreceiveBufferSize?: number

        ZMQ_RCVBUF

        Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalreceiveHighWaterMark?: number

        ZMQ_RCVHWM

        The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalreceiveTimeout?: number

        ZMQ_RCVTIMEO

        Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Pair

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

receiveBufferSize: number

ZMQ_RCVBUF

Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

receiveHighWaterMark: number

ZMQ_RCVHWM

The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

receiveTimeout: number

ZMQ_RCVTIMEO

Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

securityMechanism: null | "plain" | "curve" | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

    for await (const [msg] of socket) {
    // handle messages
    } +

    Returns AsyncIterator<Buffer[]>

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    socket.bindSync("tcp://127.0.0.1:3456")
    socket.bindSync("tcp://*:3456") // binds on all interfaces
    socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns void

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

    const [msg] = await socket.receive()
    const [part1, part2] = await socket.receive() +

    Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

    A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

    Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

    socket.receive() // -> pending promise until read is possible
    socket.receive() // -> promise rejection with `EBUSY` error +

    Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

    Returns Promise<Buffer[]>

    Resolved with message parts that were successfully read.

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) +

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • ...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Parameters

    • option: number
    • value: boolean

    Returns void

  • Parameters

    • option: number
    • value: null | string | Buffer

    Returns void

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns void

    Resolved when the socket was successfully unbound.

\ No newline at end of file diff --git a/classes/Proxy.html b/classes/Proxy.html index 653eb330..4a28ec67 100644 --- a/classes/Proxy.html +++ b/classes/Proxy.html @@ -1,2 +1,2 @@ -Proxy | zeromq.js

Class Proxy<F, B>

Proxy messages between two ØMQ sockets. The proxy connects a front-end socket to a back-end socket. Conceptually, data flows from front-end to back-end. Depending on the socket types, replies may flow in the opposite direction. The direction is conceptual only; the proxy is fully symmetric and there is no technical difference between front-end and back-end.

// Proxy between a router/dealer socket for 5 seconds.
const proxy = new Proxy(new Router, new Dealer)
await proxy.frontEnd.bind("tcp://*:3001")
await proxy.backEnd.bind("tcp://*:3002")
setTimeout(() => proxy.terminate(), 5000)
await proxy.run() -

Review the ØMQ documentation for an overview of some example applications of a proxy.

F The front-end socket type.

B The back-end socket type.

Type Parameters

Constructors

Properties

Methods

Constructors

  • Creates a new ØMQ proxy. Proxying will start between the front-end and back-end sockets when run() is called after both sockets have been bound or connected.

    Type Parameters

    Parameters

    • frontEnd: F

      The front-end socket.

    • backEnd: B

      The back-end socket.

    Returns Proxy<F, B>

Properties

backEnd: B

Returns the original back-end socket.

frontEnd: F

Returns the original front-end socket.

Methods

  • Temporarily suspends any proxy activity. Resume activity with resume().

    Returns void

  • Resumes proxy activity after suspending it with pause().

    Returns void

  • Starts the proxy loop in a worker thread and waits for its termination. Before starting, you must set any socket options, and connect or bind both front-end and back-end sockets.

    On termination the front-end and back-end sockets will be closed automatically.

    Returns Promise<void>

    Resolved when the proxy has terminated.

  • Gracefully shuts down the proxy. The front-end and back-end sockets will be closed automatically. There might be a slight delay between terminating and the run() method resolving.

    Returns void

\ No newline at end of file +Proxy | zeromq.js

Class Proxy<F, B>

Proxy messages between two ØMQ sockets. The proxy connects a front-end socket to a back-end socket. Conceptually, data flows from front-end to back-end. Depending on the socket types, replies may flow in the opposite direction. The direction is conceptual only; the proxy is fully symmetric and there is no technical difference between front-end and back-end.

// Proxy between a router/dealer socket for 5 seconds.
const proxy = new Proxy(new Router, new Dealer)
await proxy.frontEnd.bind("tcp://*:3001")
await proxy.backEnd.bind("tcp://*:3002")
setTimeout(() => proxy.terminate(), 5000)
await proxy.run() +

Review the ØMQ documentation for an overview of some example applications of a proxy.

F The front-end socket type.

B The back-end socket type.

Type Parameters

Constructors

Properties

Methods

Constructors

  • Creates a new ØMQ proxy. Proxying will start between the front-end and back-end sockets when run() is called after both sockets have been bound or connected.

    Type Parameters

    Parameters

    • frontEnd: F

      The front-end socket.

    • backEnd: B

      The back-end socket.

    Returns Proxy<F, B>

Properties

backEnd: B

Returns the original back-end socket.

frontEnd: F

Returns the original front-end socket.

Methods

  • Temporarily suspends any proxy activity. Resume activity with resume().

    Returns void

  • Resumes proxy activity after suspending it with pause().

    Returns void

  • Starts the proxy loop in a worker thread and waits for its termination. Before starting, you must set any socket options, and connect or bind both front-end and back-end sockets.

    On termination the front-end and back-end sockets will be closed automatically.

    Returns Promise<void>

    Resolved when the proxy has terminated.

  • Gracefully shuts down the proxy. The front-end and back-end sockets will be closed automatically. There might be a slight delay between terminating and the run() method resolving.

    Returns void

\ No newline at end of file diff --git a/classes/Publisher.html b/classes/Publisher.html index 3942f425..80fbf3f1 100644 --- a/classes/Publisher.html +++ b/classes/Publisher.html @@ -1,5 +1,6 @@ -Publisher | zeromq.js

Class Publisher

A Publisher socket is used to distribute data to Subscribers. Messages sent are distributed in a fan out fashion to all connected peers. This socket cannot receive messages.

When a Publisher enters the mute state due to having reached the high water mark for a connected Subscriber, then any messages that would be sent to the subscriber in question shall instead be dropped until the mute state ends. The Writable.send() method will never block.

Hierarchy (view full)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          conflate?: boolean;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          invertMatching?: boolean;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          noDrop?: boolean;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          rate?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • Optionalconflate?: boolean

        ZMQ_CONFLATE

        If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • OptionalinvertMatching?: boolean

        ZMQ_INVERT_MATCHING

        Causes messages to be sent to all connected sockets except those subscribed to a prefix that matches the message.

        All Subscriber sockets connecting to the Publisher must also have the option set to true. Failure to do so will have the Subscriber sockets reject everything the Publisher socket sends them.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalnoDrop?: boolean

        ZMQ_XPUB_NODROP

        Sets the socket behaviour to return an error if the high water mark is reached and the message could not be send. The default is to drop the message silently when the peer high water mark is reached.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Publisher

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

conflate: boolean

ZMQ_CONFLATE

If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

invertMatching: boolean

ZMQ_INVERT_MATCHING

Causes messages to be sent to all connected sockets except those subscribed to a prefix that matches the message.

All Subscriber sockets connecting to the Publisher must also have the option set to true. Failure to do so will have the Subscriber sockets reject everything the Publisher socket sends them.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

noDrop: boolean

ZMQ_XPUB_NODROP

Sets the socket behaviour to return an error if the high water mark is reached and the message could not be send. The default is to drop the message silently when the peer high water mark is reached.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

securityMechanism:
    | null
    | "plain"
    | "curve"
    | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port -

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) -

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • Rest...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

\ No newline at end of file +Publisher | zeromq.js

Class Publisher

A Publisher socket is used to distribute data to Subscribers. Messages sent are distributed in a fan out fashion to all connected peers. This socket cannot receive messages.

When a Publisher enters the mute state due to having reached the high water mark for a connected Subscriber, then any messages that would be sent to the subscriber in question shall instead be dropped until the mute state ends. The Writable.send() method will never block.

Hierarchy (View Summary)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          conflate?: boolean;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          invertMatching?: boolean;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          noDrop?: boolean;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          rate?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • Optionalconflate?: boolean

        ZMQ_CONFLATE

        If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • OptionalinvertMatching?: boolean

        ZMQ_INVERT_MATCHING

        Causes messages to be sent to all connected sockets except those subscribed to a prefix that matches the message.

        All Subscriber sockets connecting to the Publisher must also have the option set to true. Failure to do so will have the Subscriber sockets reject everything the Publisher socket sends them.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalnoDrop?: boolean

        ZMQ_XPUB_NODROP

        Sets the socket behaviour to return an error if the high water mark is reached and the message could not be send. The default is to drop the message silently when the peer high water mark is reached.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Publisher

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

conflate: boolean

ZMQ_CONFLATE

If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

invertMatching: boolean

ZMQ_INVERT_MATCHING

Causes messages to be sent to all connected sockets except those subscribed to a prefix that matches the message.

All Subscriber sockets connecting to the Publisher must also have the option set to true. Failure to do so will have the Subscriber sockets reject everything the Publisher socket sends them.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

noDrop: boolean

ZMQ_XPUB_NODROP

Sets the socket behaviour to return an error if the high water mark is reached and the message could not be send. The default is to drop the message silently when the peer high water mark is reached.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

securityMechanism: null | "plain" | "curve" | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    socket.bindSync("tcp://127.0.0.1:3456")
    socket.bindSync("tcp://*:3456") // binds on all interfaces
    socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns void

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) +

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • ...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Parameters

    • option: number
    • value: boolean

    Returns void

  • Parameters

    • option: number
    • value: null | string | Buffer

    Returns void

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns void

    Resolved when the socket was successfully unbound.

\ No newline at end of file diff --git a/classes/Pull.html b/classes/Pull.html index 57143981..805d95e1 100644 --- a/classes/Pull.html +++ b/classes/Pull.html @@ -1,7 +1,8 @@ -Pull | zeromq.js

Class Pull

A Pull socket is used by a pipeline node to receive messages from upstream pipeline nodes. Messages are fair-queued from among all connected upstream nodes. This socket cannot send messages.

Hierarchy (view full)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          conflate?: boolean;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          rate?: number;
          receiveBufferSize?: number;
          receiveHighWaterMark?: number;
          receiveTimeout?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • Optionalconflate?: boolean

        ZMQ_CONFLATE

        If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreceiveBufferSize?: number

        ZMQ_RCVBUF

        Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalreceiveHighWaterMark?: number

        ZMQ_RCVHWM

        The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalreceiveTimeout?: number

        ZMQ_RCVTIMEO

        Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Pull

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

conflate: boolean

ZMQ_CONFLATE

If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

receiveBufferSize: number

ZMQ_RCVBUF

Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

receiveHighWaterMark: number

ZMQ_RCVHWM

The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

receiveTimeout: number

ZMQ_RCVTIMEO

Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

securityMechanism:
    | null
    | "plain"
    | "curve"
    | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

    for await (const [msg] of socket) {
    // handle messages
    } -

    Returns AsyncIterator<Buffer[], undefined, undefined>

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port -

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

    const [msg] = await socket.receive()
    const [part1, part2] = await socket.receive() -

    Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

    A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

    Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

    socket.receive() // -> pending promise until read is possible
    socket.receive() // -> promise rejection with `EBUSY` error -

    Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

    Returns Promise<Buffer[]>

    Resolved with message parts that were successfully read.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

\ No newline at end of file +Pull | zeromq.js

Class Pull

A Pull socket is used by a pipeline node to receive messages from upstream pipeline nodes. Messages are fair-queued from among all connected upstream nodes. This socket cannot send messages.

Hierarchy (View Summary)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          conflate?: boolean;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          rate?: number;
          receiveBufferSize?: number;
          receiveHighWaterMark?: number;
          receiveTimeout?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • Optionalconflate?: boolean

        ZMQ_CONFLATE

        If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreceiveBufferSize?: number

        ZMQ_RCVBUF

        Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalreceiveHighWaterMark?: number

        ZMQ_RCVHWM

        The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalreceiveTimeout?: number

        ZMQ_RCVTIMEO

        Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Pull

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

conflate: boolean

ZMQ_CONFLATE

If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

receiveBufferSize: number

ZMQ_RCVBUF

Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

receiveHighWaterMark: number

ZMQ_RCVHWM

The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

receiveTimeout: number

ZMQ_RCVTIMEO

Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

securityMechanism: null | "plain" | "curve" | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

    for await (const [msg] of socket) {
    // handle messages
    } +

    Returns AsyncIterator<Buffer[]>

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    socket.bindSync("tcp://127.0.0.1:3456")
    socket.bindSync("tcp://*:3456") // binds on all interfaces
    socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns void

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

    const [msg] = await socket.receive()
    const [part1, part2] = await socket.receive() +

    Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

    A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

    Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

    socket.receive() // -> pending promise until read is possible
    socket.receive() // -> promise rejection with `EBUSY` error +

    Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

    Returns Promise<Buffer[]>

    Resolved with message parts that were successfully read.

  • Parameters

    • option: number
    • value: boolean

    Returns void

  • Parameters

    • option: number
    • value: null | string | Buffer

    Returns void

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns void

    Resolved when the socket was successfully unbound.

\ No newline at end of file diff --git a/classes/Push.html b/classes/Push.html index 45d38b3b..e1a3d19e 100644 --- a/classes/Push.html +++ b/classes/Push.html @@ -1,5 +1,6 @@ -Push | zeromq.js

Class Push

A Push socket is used by a pipeline node to send messages to downstream pipeline nodes. Messages are round-robined to all connected downstream nodes. This socket cannot receive messages.

When a Push socket enters the mute state due to having reached the high water mark for all downstream nodes, or if there are no downstream nodes at all, then Writable.send() will block until the mute state ends or at least one downstream node becomes available for sending; messages are not discarded.

Hierarchy (view full)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          conflate?: boolean;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          rate?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • Optionalconflate?: boolean

        ZMQ_CONFLATE

        If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Push

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

conflate: boolean

ZMQ_CONFLATE

If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

securityMechanism:
    | null
    | "plain"
    | "curve"
    | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port -

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) -

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • Rest...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

\ No newline at end of file +Push | zeromq.js

Class Push

A Push socket is used by a pipeline node to send messages to downstream pipeline nodes. Messages are round-robined to all connected downstream nodes. This socket cannot receive messages.

When a Push socket enters the mute state due to having reached the high water mark for all downstream nodes, or if there are no downstream nodes at all, then Writable.send() will block until the mute state ends or at least one downstream node becomes available for sending; messages are not discarded.

Hierarchy (View Summary)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          conflate?: boolean;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          rate?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • Optionalconflate?: boolean

        ZMQ_CONFLATE

        If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Push

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

conflate: boolean

ZMQ_CONFLATE

If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

securityMechanism: null | "plain" | "curve" | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    socket.bindSync("tcp://127.0.0.1:3456")
    socket.bindSync("tcp://*:3456") // binds on all interfaces
    socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns void

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) +

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • ...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Parameters

    • option: number
    • value: boolean

    Returns void

  • Parameters

    • option: number
    • value: null | string | Buffer

    Returns void

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns void

    Resolved when the socket was successfully unbound.

\ No newline at end of file diff --git a/classes/Reply.html b/classes/Reply.html index 86f43934..a1bf4bf7 100644 --- a/classes/Reply.html +++ b/classes/Reply.html @@ -1,8 +1,9 @@ -Reply | zeromq.js

Class Reply

A Reply socket can act as a server which receives requests from and sends replies to a Request socket. This socket type allows only an alternating sequence of Readable.receive() and subsequent Writable.send() calls. Each request received is fair-queued from among all clients, and each reply sent is routed to the client that issued the last request. If the original requester does not exist any more the reply is silently discarded.

Hierarchy (view full)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          rate?: number;
          receiveBufferSize?: number;
          receiveHighWaterMark?: number;
          receiveTimeout?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          routingId?: null | string;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreceiveBufferSize?: number

        ZMQ_RCVBUF

        Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalreceiveHighWaterMark?: number

        ZMQ_RCVHWM

        The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalreceiveTimeout?: number

        ZMQ_RCVTIMEO

        Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalroutingId?: null | string

        ZMQ_ROUTING_ID

        The identity of the specified socket when connecting to a Router socket.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Reply

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

receiveBufferSize: number

ZMQ_RCVBUF

Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

receiveHighWaterMark: number

ZMQ_RCVHWM

The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

receiveTimeout: number

ZMQ_RCVTIMEO

Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

routingId: null | string

ZMQ_ROUTING_ID

The identity of the specified socket when connecting to a Router socket.

securityMechanism:
    | null
    | "plain"
    | "curve"
    | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

    for await (const [msg] of socket) {
    // handle messages
    } -

    Returns AsyncIterator<Buffer[], undefined, undefined>

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port -

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

    const [msg] = await socket.receive()
    const [part1, part2] = await socket.receive() -

    Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

    A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

    Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

    socket.receive() // -> pending promise until read is possible
    socket.receive() // -> promise rejection with `EBUSY` error -

    Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

    Returns Promise<Buffer[]>

    Resolved with message parts that were successfully read.

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) -

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • Rest...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

\ No newline at end of file +Reply | zeromq.js

Class Reply

A Reply socket can act as a server which receives requests from and sends replies to a Request socket. This socket type allows only an alternating sequence of Readable.receive() and subsequent Writable.send() calls. Each request received is fair-queued from among all clients, and each reply sent is routed to the client that issued the last request. If the original requester does not exist any more the reply is silently discarded.

Hierarchy (View Summary)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          rate?: number;
          receiveBufferSize?: number;
          receiveHighWaterMark?: number;
          receiveTimeout?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          routingId?: null | string;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreceiveBufferSize?: number

        ZMQ_RCVBUF

        Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalreceiveHighWaterMark?: number

        ZMQ_RCVHWM

        The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalreceiveTimeout?: number

        ZMQ_RCVTIMEO

        Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalroutingId?: null | string

        ZMQ_ROUTING_ID

        The identity of the specified socket when connecting to a Router socket.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Reply

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

receiveBufferSize: number

ZMQ_RCVBUF

Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

receiveHighWaterMark: number

ZMQ_RCVHWM

The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

receiveTimeout: number

ZMQ_RCVTIMEO

Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

routingId: null | string

ZMQ_ROUTING_ID

The identity of the specified socket when connecting to a Router socket.

securityMechanism: null | "plain" | "curve" | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

    for await (const [msg] of socket) {
    // handle messages
    } +

    Returns AsyncIterator<Buffer[]>

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    socket.bindSync("tcp://127.0.0.1:3456")
    socket.bindSync("tcp://*:3456") // binds on all interfaces
    socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns void

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

    const [msg] = await socket.receive()
    const [part1, part2] = await socket.receive() +

    Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

    A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

    Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

    socket.receive() // -> pending promise until read is possible
    socket.receive() // -> promise rejection with `EBUSY` error +

    Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

    Returns Promise<Buffer[]>

    Resolved with message parts that were successfully read.

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) +

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • ...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Parameters

    • option: number
    • value: boolean

    Returns void

  • Parameters

    • option: number
    • value: null | string | Buffer

    Returns void

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns void

    Resolved when the socket was successfully unbound.

\ No newline at end of file diff --git a/classes/Request.html b/classes/Request.html index 7827904f..926c70e8 100644 --- a/classes/Request.html +++ b/classes/Request.html @@ -1,8 +1,9 @@ -Request | zeromq.js

Class Request

A Request socket acts as a client to send requests to and receive replies from a Reply socket. This socket allows only an alternating sequence of Writable.send() and subsequent Readable.receive() calls. Each request sent is round-robined among all services, and each reply received is matched with the last issued request.

If no services are available, then any send operation on the socket shall block until at least one service becomes available. The REQ socket shall not discard messages.

Hierarchy (view full)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          connectTimeout?: number;
          context?: Context;
          correlate?: boolean;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          probeRouter?: boolean;
          rate?: number;
          receiveBufferSize?: number;
          receiveHighWaterMark?: number;
          receiveTimeout?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          relaxed?: boolean;
          routingId?: null | string;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • Optionalcorrelate?: boolean

        ZMQ_REQ_CORRELATE

        The default behaviour of Request sockets is to rely on the ordering of messages to match requests and responses and that is usually sufficient. When this option is set to true the socket will prefix outgoing messages with an extra frame containing a request id. That means the full message is [<request id>,null, user frames…]. The Request socket will discard all incoming messages that don't begin with these two frames.

      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalprobeRouter?: boolean

        ZMQ_PROBE_ROUTER

        When set to true, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on sockets connected to a Router socket. The application must filter such empty messages. This option provides the Router with an event signaling the arrival of a new peer.

        Warning:* Do not set this option on a socket that talks to any other socket type except Router: the results are undefined.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreceiveBufferSize?: number

        ZMQ_RCVBUF

        Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalreceiveHighWaterMark?: number

        ZMQ_RCVHWM

        The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalreceiveTimeout?: number

        ZMQ_RCVTIMEO

        Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • Optionalrelaxed?: boolean

        ZMQ_REQ_RELAXED

        By default, a Request socket does not allow initiating a new request until the reply to the previous one has been received. When set to true, sending another message is allowed and previous replies will be discarded. The request-reply state machine is reset and a new request is sent to the next available peer.

        Note: If set to true, also enable correlate to ensure correct matching of requests and replies. Otherwise a late reply to an aborted request can be reported as the reply to the superseding request.

      • OptionalroutingId?: null | string

        ZMQ_ROUTING_ID

        The identity of the specified socket when connecting to a Router socket.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Request

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

correlate: boolean

ZMQ_REQ_CORRELATE

The default behaviour of Request sockets is to rely on the ordering of messages to match requests and responses and that is usually sufficient. When this option is set to true the socket will prefix outgoing messages with an extra frame containing a request id. That means the full message is [<request id>,null, user frames…]. The Request socket will discard all incoming messages that don't begin with these two frames.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

probeRouter: boolean

ZMQ_PROBE_ROUTER

When set to true, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on sockets connected to a Router socket. The application must filter such empty messages. This option provides the Router with an event signaling the arrival of a new peer.

Warning:* Do not set this option on a socket that talks to any other socket type except Router: the results are undefined.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

receiveBufferSize: number

ZMQ_RCVBUF

Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

receiveHighWaterMark: number

ZMQ_RCVHWM

The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

receiveTimeout: number

ZMQ_RCVTIMEO

Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

relaxed: boolean

ZMQ_REQ_RELAXED

By default, a Request socket does not allow initiating a new request until the reply to the previous one has been received. When set to true, sending another message is allowed and previous replies will be discarded. The request-reply state machine is reset and a new request is sent to the next available peer.

Note: If set to true, also enable correlate to ensure correct matching of requests and replies. Otherwise a late reply to an aborted request can be reported as the reply to the superseding request.

routingId: null | string

ZMQ_ROUTING_ID

The identity of the specified socket when connecting to a Router socket.

securityMechanism:
    | null
    | "plain"
    | "curve"
    | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

    for await (const [msg] of socket) {
    // handle messages
    } -

    Returns AsyncIterator<Buffer[], undefined, undefined>

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port -

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

    const [msg] = await socket.receive()
    const [part1, part2] = await socket.receive() -

    Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

    A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

    Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

    socket.receive() // -> pending promise until read is possible
    socket.receive() // -> promise rejection with `EBUSY` error -

    Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

    Returns Promise<Buffer[]>

    Resolved with message parts that were successfully read.

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) -

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • Rest...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

\ No newline at end of file +Request | zeromq.js

Class Request

A Request socket acts as a client to send requests to and receive replies from a Reply socket. This socket allows only an alternating sequence of Writable.send() and subsequent Readable.receive() calls. Each request sent is round-robined among all services, and each reply received is matched with the last issued request.

If no services are available, then any send operation on the socket shall block until at least one service becomes available. The REQ socket shall not discard messages.

Hierarchy (View Summary)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          connectTimeout?: number;
          context?: Context;
          correlate?: boolean;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          probeRouter?: boolean;
          rate?: number;
          receiveBufferSize?: number;
          receiveHighWaterMark?: number;
          receiveTimeout?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          relaxed?: boolean;
          routingId?: null | string;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • Optionalcorrelate?: boolean

        ZMQ_REQ_CORRELATE

        The default behaviour of Request sockets is to rely on the ordering of messages to match requests and responses and that is usually sufficient. When this option is set to true the socket will prefix outgoing messages with an extra frame containing a request id. That means the full message is [<request id>,null, user frames…]. The Request socket will discard all incoming messages that don't begin with these two frames.

      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalprobeRouter?: boolean

        ZMQ_PROBE_ROUTER

        When set to true, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on sockets connected to a Router socket. The application must filter such empty messages. This option provides the Router with an event signaling the arrival of a new peer.

        Warning:* Do not set this option on a socket that talks to any other socket type except Router: the results are undefined.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreceiveBufferSize?: number

        ZMQ_RCVBUF

        Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalreceiveHighWaterMark?: number

        ZMQ_RCVHWM

        The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalreceiveTimeout?: number

        ZMQ_RCVTIMEO

        Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • Optionalrelaxed?: boolean

        ZMQ_REQ_RELAXED

        By default, a Request socket does not allow initiating a new request until the reply to the previous one has been received. When set to true, sending another message is allowed and previous replies will be discarded. The request-reply state machine is reset and a new request is sent to the next available peer.

        Note: If set to true, also enable correlate to ensure correct matching of requests and replies. Otherwise a late reply to an aborted request can be reported as the reply to the superseding request.

      • OptionalroutingId?: null | string

        ZMQ_ROUTING_ID

        The identity of the specified socket when connecting to a Router socket.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Request

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

correlate: boolean

ZMQ_REQ_CORRELATE

The default behaviour of Request sockets is to rely on the ordering of messages to match requests and responses and that is usually sufficient. When this option is set to true the socket will prefix outgoing messages with an extra frame containing a request id. That means the full message is [<request id>,null, user frames…]. The Request socket will discard all incoming messages that don't begin with these two frames.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

probeRouter: boolean

ZMQ_PROBE_ROUTER

When set to true, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on sockets connected to a Router socket. The application must filter such empty messages. This option provides the Router with an event signaling the arrival of a new peer.

Warning:* Do not set this option on a socket that talks to any other socket type except Router: the results are undefined.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

receiveBufferSize: number

ZMQ_RCVBUF

Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

receiveHighWaterMark: number

ZMQ_RCVHWM

The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

receiveTimeout: number

ZMQ_RCVTIMEO

Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

relaxed: boolean

ZMQ_REQ_RELAXED

By default, a Request socket does not allow initiating a new request until the reply to the previous one has been received. When set to true, sending another message is allowed and previous replies will be discarded. The request-reply state machine is reset and a new request is sent to the next available peer.

Note: If set to true, also enable correlate to ensure correct matching of requests and replies. Otherwise a late reply to an aborted request can be reported as the reply to the superseding request.

routingId: null | string

ZMQ_ROUTING_ID

The identity of the specified socket when connecting to a Router socket.

securityMechanism: null | "plain" | "curve" | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

    for await (const [msg] of socket) {
    // handle messages
    } +

    Returns AsyncIterator<Buffer[]>

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    socket.bindSync("tcp://127.0.0.1:3456")
    socket.bindSync("tcp://*:3456") // binds on all interfaces
    socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns void

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

    socket.connect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The address to connect to.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

    const [msg] = await socket.receive()
    const [part1, part2] = await socket.receive() +

    Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

    A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

    Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

    socket.receive() // -> pending promise until read is possible
    socket.receive() // -> promise rejection with `EBUSY` error +

    Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

    Returns Promise<Buffer[]>

    Resolved with message parts that were successfully read.

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) +

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • ...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Parameters

    • option: number
    • value: boolean

    Returns void

  • Parameters

    • option: number
    • value: null | string | Buffer

    Returns void

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns void

    Resolved when the socket was successfully unbound.

\ No newline at end of file diff --git a/classes/Router.html b/classes/Router.html index 7b867e35..72e1be45 100644 --- a/classes/Router.html +++ b/classes/Router.html @@ -1,7 +1,8 @@ -Router | zeromq.js

Class Router

A Router can be used to extend request/reply sockets. When receiving messages a Router shall prepend a message part containing the routing id of the originating peer to the message. Messages received are fair-queued from among all connected peers. When sending messages, the first part of the message is removed and used to determine the routing id of the peer the message should be routed to.

If the peer does not exist anymore, or has never existed, the message shall be silently discarded. However, if Router.mandatory is set to true, the socket shall fail with a EHOSTUNREACH error in both cases.

When a Router enters the mute state due to having reached the high water mark for all peers, then any messages sent to the socket shall be dropped until the mute state ends. Likewise, any messages routed to a peer for which the individual high water mark has been reached shall also be dropped. If Router.mandatory is set to true the socket shall block or return an EAGAIN error in both cases.

When a Request socket is connected to a Router, in addition to the routing id of the originating peer each message received shall contain an empty delimiter message part. Hence, the entire structure of each received message as seen by the application becomes: one or more routing id parts, delimiter part, one or more body parts. When sending replies to a Request the delimiter part must be included.

Hierarchy (view full)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handover?: boolean;
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          mandatory?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          probeRouter?: boolean;
          rate?: number;
          receiveBufferSize?: number;
          receiveHighWaterMark?: number;
          receiveTimeout?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          routingId?: null | string;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • Optionalhandover?: boolean

        ZMQ_ROUTER_HANDOVER

        If two clients use the same identity when connecting to a Router, the results shall depend on the this option. If it set to false (default), the Router socket shall reject clients trying to connect with an already-used identity. If it is set to true, the Router socket shall hand-over the connection to the new client and disconnect the existing one.

      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • Optionalmandatory?: boolean

        ZMQ_ROUTER_MANDATORY

        A value of false is the default and discards the message silently when it cannot be routed or the peer's high water mark is reached. A value of true causes send() to fail if it cannot be routed, or wait asynchronously if the high water mark is reached.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalprobeRouter?: boolean

        ZMQ_PROBE_ROUTER

        When set to true, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on sockets connected to a Router socket. The application must filter such empty messages. This option provides the Router with an event signaling the arrival of a new peer.

        Warning:* Do not set this option on a socket that talks to any other socket type except Router: the results are undefined.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreceiveBufferSize?: number

        ZMQ_RCVBUF

        Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalreceiveHighWaterMark?: number

        ZMQ_RCVHWM

        The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalreceiveTimeout?: number

        ZMQ_RCVTIMEO

        Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalroutingId?: null | string

        ZMQ_ROUTING_ID

        The identity of the specified socket when connecting to a Router socket.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Router

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handover: boolean

ZMQ_ROUTER_HANDOVER

If two clients use the same identity when connecting to a Router, the results shall depend on the this option. If it set to false (default), the Router socket shall reject clients trying to connect with an already-used identity. If it is set to true, the Router socket shall hand-over the connection to the new client and disconnect the existing one.

handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

mandatory: boolean

ZMQ_ROUTER_MANDATORY

A value of false is the default and discards the message silently when it cannot be routed or the peer's high water mark is reached. A value of true causes send() to fail if it cannot be routed, or wait asynchronously if the high water mark is reached.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

probeRouter: boolean

ZMQ_PROBE_ROUTER

When set to true, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on sockets connected to a Router socket. The application must filter such empty messages. This option provides the Router with an event signaling the arrival of a new peer.

Warning:* Do not set this option on a socket that talks to any other socket type except Router: the results are undefined.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

receiveBufferSize: number

ZMQ_RCVBUF

Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

receiveHighWaterMark: number

ZMQ_RCVHWM

The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

receiveTimeout: number

ZMQ_RCVTIMEO

Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

routingId: null | string

ZMQ_ROUTING_ID

The identity of the specified socket when connecting to a Router socket.

securityMechanism:
    | null
    | "plain"
    | "curve"
    | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

    for await (const [msg] of socket) {
    // handle messages
    } -

    Returns AsyncIterator<Buffer[], undefined, undefined>

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port -

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the given remote address. To specificy a specific routing id, provide a routingId option. The identity should be unique, from 1 to 255 bytes long and MAY NOT start with binary zero.

    Parameters

    • address: string

      The tcp:// address to connect to.

    • options: RouterConnectOptions = {}

      Any connection options.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    -

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

    const [msg] = await socket.receive()
    const [part1, part2] = await socket.receive() -

    Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

    A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

    Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

    socket.receive() // -> pending promise until read is possible
    socket.receive() // -> promise rejection with `EBUSY` error -

    Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

    Returns Promise<Buffer[]>

    Resolved with message parts that were successfully read.

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) -

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • Rest...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

\ No newline at end of file +Router | zeromq.js

Class Router

A Router can be used to extend request/reply sockets. When receiving messages a Router shall prepend a message part containing the routing id of the originating peer to the message. Messages received are fair-queued from among all connected peers. When sending messages, the first part of the message is removed and used to determine the routing id of the peer the message should be routed to.

If the peer does not exist anymore, or has never existed, the message shall be silently discarded. However, if Router.mandatory is set to true, the socket shall fail with a EHOSTUNREACH error in both cases.

When a Router enters the mute state due to having reached the high water mark for all peers, then any messages sent to the socket shall be dropped until the mute state ends. Likewise, any messages routed to a peer for which the individual high water mark has been reached shall also be dropped. If Router.mandatory is set to true the socket shall block or return an EAGAIN error in both cases.

When a Request socket is connected to a Router, in addition to the routing id of the originating peer each message received shall contain an empty delimiter message part. Hence, the entire structure of each received message as seen by the application becomes: one or more routing id parts, delimiter part, one or more body parts. When sending replies to a Request the delimiter part must be included.

Hierarchy (View Summary)

Constructors

  • Parameters

    • Optionaloptions: {
          affinity?: number;
          backlog?: number;
          connectTimeout?: number;
          context?: Context;
          curvePublicKey?: null | string;
          curveSecretKey?: null | string;
          curveServer?: boolean;
          curveServerKey?: null | string;
          gssapiPlainText?: boolean;
          gssapiPrincipal?: null | string;
          gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          gssapiServer?: boolean;
          gssapiServicePrincipal?: null | string;
          gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
          handover?: boolean;
          handshakeInterval?: number;
          heartbeatInterval?: number;
          heartbeatTimeout?: number;
          heartbeatTimeToLive?: number;
          immediate?: boolean;
          interface?: null | string;
          ipv6?: boolean;
          linger?: number;
          loopbackFastPath?: boolean;
          mandatory?: boolean;
          maxMessageSize?: number;
          multicastHops?: number;
          multicastMaxTransportDataUnit?: number;
          plainPassword?: null | string;
          plainServer?: boolean;
          plainUsername?: null | string;
          probeRouter?: boolean;
          rate?: number;
          receiveBufferSize?: number;
          receiveHighWaterMark?: number;
          receiveTimeout?: number;
          reconnectInterval?: number;
          reconnectMaxInterval?: number;
          recoveryInterval?: number;
          routingId?: null | string;
          sendBufferSize?: number;
          sendHighWaterMark?: number;
          sendTimeout?: number;
          socksProxy?: null | string;
          tcpAcceptFilter?: null | string;
          tcpKeepalive?: number;
          tcpKeepaliveCount?: number;
          tcpKeepaliveIdle?: number;
          tcpKeepaliveInterval?: number;
          tcpMaxRetransmitTimeout?: number;
          typeOfService?: number;
          vmciBufferMaxSize?: number;
          vmciBufferMinSize?: number;
          vmciBufferSize?: number;
          vmciConnectTimeout?: number;
          zapDomain?: null | string;
          zapEnforceDomain?: boolean;
      }
      • Optionalaffinity?: number

        ZMQ_AFFINITY

        I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

        Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

      • Optionalbacklog?: number

        ZMQ_BACKLOG

        Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

      • OptionalconnectTimeout?: number

        ZMQ_CONNECT_TIMEOUT

        Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

      • Optionalcontext?: Context
      • OptionalcurvePublicKey?: null | string

        ZMQ_CURVE_PUBLICKEY

        Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

      • OptionalcurveSecretKey?: null | string

        ZMQ_CURVE_SECRETKEY

        Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

      • OptionalcurveServer?: boolean

        ZMQ_CURVE_SERVER

        Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

      • OptionalcurveServerKey?: null | string

        ZMQ_CURVE_SERVERKEY

        Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

      • OptionalgssapiPlainText?: boolean
      • OptionalgssapiPrincipal?: null | string
      • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • OptionalgssapiServer?: boolean
      • OptionalgssapiServicePrincipal?: null | string
      • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
      • Optionalhandover?: boolean

        ZMQ_ROUTER_HANDOVER

        If two clients use the same identity when connecting to a Router, the results shall depend on the this option. If it set to false (default), the Router socket shall reject clients trying to connect with an already-used identity. If it is set to true, the Router socket shall hand-over the connection to the new client and disconnect the existing one.

      • OptionalhandshakeInterval?: number

        ZMQ_HANDSHAKE_IVL

        Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

      • OptionalheartbeatInterval?: number

        ZMQ_HEARTBEAT_IVL

        Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

      • OptionalheartbeatTimeout?: number

        ZMQ_HEARTBEAT_TIMEOUT

        How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

      • OptionalheartbeatTimeToLive?: number

        ZMQ_HEARTBEAT_TTL

        The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

      • Optionalimmediate?: boolean

        ZMQ_IMMEDIATE

        By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

      • Optionalinterface?: null | string

        ZMQ_BINDTODEVICE

        Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

      • Optionalipv6?: boolean

        ZMQ_IPV6

        Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

      • Optionallinger?: number

        ZMQ_LINGER

        Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

      • OptionalloopbackFastPath?: boolean

        ZMQ_LOOPBACK_FASTPATH

        Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

      • Optionalmandatory?: boolean

        ZMQ_ROUTER_MANDATORY

        A value of false is the default and discards the message silently when it cannot be routed or the peer's high water mark is reached. A value of true causes send() to fail if it cannot be routed, or wait asynchronously if the high water mark is reached.

      • OptionalmaxMessageSize?: number

        ZMQ_MAXMSGSIZE

        Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

      • OptionalmulticastHops?: number

        ZMQ_MULTICAST_HOPS

        Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

      • OptionalmulticastMaxTransportDataUnit?: number

        ZMQ_MULTICAST_MAXTPDU

        Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

      • OptionalplainPassword?: null | string

        ZMQ_PLAIN_PASSWORD

        Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalplainServer?: boolean

        ZMQ_PLAIN_SERVER

        Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

      • OptionalplainUsername?: null | string

        ZMQ_PLAIN_USERNAME

        Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

      • OptionalprobeRouter?: boolean

        ZMQ_PROBE_ROUTER

        When set to true, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on sockets connected to a Router socket. The application must filter such empty messages. This option provides the Router with an event signaling the arrival of a new peer.

        Warning:* Do not set this option on a socket that talks to any other socket type except Router: the results are undefined.

      • Optionalrate?: number

        ZMQ_RATE

        Maximum send or receive data rate for multicast transports such as pgm.

      • OptionalreceiveBufferSize?: number

        ZMQ_RCVBUF

        Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalreceiveHighWaterMark?: number

        ZMQ_RCVHWM

        The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalreceiveTimeout?: number

        ZMQ_RCVTIMEO

        Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

      • OptionalreconnectInterval?: number

        ZMQ_RECONNECT_IVL

        Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

      • OptionalreconnectMaxInterval?: number

        ZMQ_RECONNECT_IVL_MAX

        Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

      • OptionalrecoveryInterval?: number

        ZMQ_RECOVERY_IVL

        Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

      • OptionalroutingId?: null | string

        ZMQ_ROUTING_ID

        The identity of the specified socket when connecting to a Router socket.

      • OptionalsendBufferSize?: number

        ZMQ_SNDBUF

        Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

      • OptionalsendHighWaterMark?: number

        ZMQ_SNDHWM

        The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

        If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

      • OptionalsendTimeout?: number

        ZMQ_SNDTIMEO

        Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

      • OptionalsocksProxy?: null | string

        ZMQ_SOCKS_PROXY

        The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

      • OptionaltcpAcceptFilter?: null | string

        ZMQ_TCP_ACCEPT_FILTER

        Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

      • OptionaltcpKeepalive?: number

        ZMQ_TCP_KEEPALIVE

        Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveCount?: number

        ZMQ_TCP_KEEPALIVE_CNT

        Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveIdle?: number

        ZMQ_TCP_KEEPALIVE_IDLE

        Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpKeepaliveInterval?: number

        ZMQ_TCP_KEEPALIVE_INTVL

        Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

      • OptionaltcpMaxRetransmitTimeout?: number

        ZMQ_TCP_MAXRT

        Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

      • OptionaltypeOfService?: number

        ZMQ_TOS

        Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

      • OptionalvmciBufferMaxSize?: number

        ZMQ_VMCI_BUFFER_MAX_SIZE

        Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferMinSize?: number

        ZMQ_VMCI_BUFFER_MIN_SIZE

        Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciBufferSize?: number

        ZMQ_VMCI_BUFFER_SIZE

        The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

      • OptionalvmciConnectTimeout?: number

        ZMQ_VMCI_CONNECT_TIMEOUT

        Connection timeout for the socket. For vmci:// transports only.

      • OptionalzapDomain?: null | string

        ZMQ_ZAP_DOMAIN

        Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

      • OptionalzapEnforceDomain?: boolean

        ZMQ_ZAP_ENFORCE_DOMAIN

        The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Returns Router

Properties

affinity: number

ZMQ_AFFINITY

I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

backlog: number

ZMQ_BACKLOG

Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

closed: boolean

Whether this socket was previously closed with close().

connectTimeout: number

ZMQ_CONNECT_TIMEOUT

Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

context: Context

Context that this socket belongs to.

curvePublicKey: null | string

ZMQ_CURVE_PUBLICKEY

Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

curveSecretKey: null | string

ZMQ_CURVE_SECRETKEY

Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

curveServer: boolean

ZMQ_CURVE_SERVER

Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

curveServerKey: null | string

ZMQ_CURVE_SERVERKEY

Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

events: Observer

Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

gssapiPlainText: boolean
gssapiPrincipal: null | string
gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
gssapiServer: boolean
gssapiServicePrincipal: null | string
gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
handover: boolean

ZMQ_ROUTER_HANDOVER

If two clients use the same identity when connecting to a Router, the results shall depend on the this option. If it set to false (default), the Router socket shall reject clients trying to connect with an already-used identity. If it is set to true, the Router socket shall hand-over the connection to the new client and disconnect the existing one.

handshakeInterval: number

ZMQ_HANDSHAKE_IVL

Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

heartbeatInterval: number

ZMQ_HEARTBEAT_IVL

Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

heartbeatTimeout: number

ZMQ_HEARTBEAT_TIMEOUT

How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

heartbeatTimeToLive: number

ZMQ_HEARTBEAT_TTL

The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

immediate: boolean

ZMQ_IMMEDIATE

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

interface: null | string

ZMQ_BINDTODEVICE

Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

ipv6: boolean

ZMQ_IPV6

Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

lastEndpoint: null | string

ZMQ_LAST_ENDPOINT

The last endpoint bound for TCP and IPC transports.

linger: number

ZMQ_LINGER

Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

loopbackFastPath: boolean

ZMQ_LOOPBACK_FASTPATH

Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

mandatory: boolean

ZMQ_ROUTER_MANDATORY

A value of false is the default and discards the message silently when it cannot be routed or the peer's high water mark is reached. A value of true causes send() to fail if it cannot be routed, or wait asynchronously if the high water mark is reached.

maxMessageSize: number

ZMQ_MAXMSGSIZE

Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

multicastHops: number

ZMQ_MULTICAST_HOPS

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

multicastMaxTransportDataUnit: number

ZMQ_MULTICAST_MAXTPDU

Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

plainPassword: null | string

ZMQ_PLAIN_PASSWORD

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

plainServer: boolean

ZMQ_PLAIN_SERVER

Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

plainUsername: null | string

ZMQ_PLAIN_USERNAME

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

probeRouter: boolean

ZMQ_PROBE_ROUTER

When set to true, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on sockets connected to a Router socket. The application must filter such empty messages. This option provides the Router with an event signaling the arrival of a new peer.

Warning:* Do not set this option on a socket that talks to any other socket type except Router: the results are undefined.

rate: number

ZMQ_RATE

Maximum send or receive data rate for multicast transports such as pgm.

readable: boolean

Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

receiveBufferSize: number

ZMQ_RCVBUF

Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

receiveHighWaterMark: number

ZMQ_RCVHWM

The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

receiveTimeout: number

ZMQ_RCVTIMEO

Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

reconnectInterval: number

ZMQ_RECONNECT_IVL

Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

reconnectMaxInterval: number

ZMQ_RECONNECT_IVL_MAX

Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

recoveryInterval: number

ZMQ_RECOVERY_IVL

Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

routingId: null | string

ZMQ_ROUTING_ID

The identity of the specified socket when connecting to a Router socket.

securityMechanism: null | "plain" | "curve" | "gssapi"

ZMQ_MECHANISM

Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

  • null - No security mechanism is used.
  • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
  • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
  • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
sendBufferSize: number

ZMQ_SNDBUF

Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

sendHighWaterMark: number

ZMQ_SNDHWM

The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

sendTimeout: number

ZMQ_SNDTIMEO

Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

socksProxy: null | string

ZMQ_SOCKS_PROXY

The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

tcpAcceptFilter: null | string

ZMQ_TCP_ACCEPT_FILTER

Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

tcpKeepalive: number

ZMQ_TCP_KEEPALIVE

Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveCount: number

ZMQ_TCP_KEEPALIVE_CNT

Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveIdle: number

ZMQ_TCP_KEEPALIVE_IDLE

Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

tcpKeepaliveInterval: number

ZMQ_TCP_KEEPALIVE_INTVL

Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

tcpMaxRetransmitTimeout: number

ZMQ_TCP_MAXRT

Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

threadSafe: boolean

ZMQ_THREAD_SAFE

Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

type: SocketType

ZMQ_TYPE

Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

typeOfService: number

ZMQ_TOS

Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

vmciBufferMaxSize: number

ZMQ_VMCI_BUFFER_MAX_SIZE

Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferMinSize: number

ZMQ_VMCI_BUFFER_MIN_SIZE

Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciBufferSize: number

ZMQ_VMCI_BUFFER_SIZE

The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

vmciConnectTimeout: number

ZMQ_VMCI_CONNECT_TIMEOUT

Connection timeout for the socket. For vmci:// transports only.

writable: boolean

Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

zapDomain: null | string

ZMQ_ZAP_DOMAIN

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

zapEnforceDomain: boolean

ZMQ_ZAP_ENFORCE_DOMAIN

The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

Methods

  • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

    for await (const [msg] of socket) {
    // handle messages
    } +

    Returns AsyncIterator<Buffer[]>

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    await socket.bind("tcp://127.0.0.1:3456")
    await socket.bind("tcp://*:3456") // binds on all interfaces
    await socket.bind("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns Promise<void>

    Resolved when the socket was successfully bound.

  • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

    socket.bindSync("tcp://127.0.0.1:3456")
    socket.bindSync("tcp://*:3456") // binds on all interfaces
    socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

    Parameters

    • address: string

      Address to bind this socket to.

    Returns void

    Resolved when the socket was successfully bound.

  • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

    After this method is called, it is no longer possible to call any other methods on this socket.

    Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

    Calling this method on a socket that is already closed is a no-op.

    Returns void

  • Connects to the given remote address. To specificy a specific routing id, provide a routingId option. The identity should be unique, from 1 to 255 bytes long and MAY NOT start with binary zero.

    Parameters

    • address: string

      The tcp:// address to connect to.

    • options: RouterConnectOptions = {}

      Any connection options.

    Returns void

  • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

    socket.disconnect("tcp://127.0.0.1:3456")
    +

    Parameters

    • address: string

      The previously connected address to disconnect from.

    Returns void

  • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

    const [msg] = await socket.receive()
    const [part1, part2] = await socket.receive() +

    Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

    A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

    Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

    socket.receive() // -> pending promise until read is possible
    socket.receive() // -> promise rejection with `EBUSY` error +

    Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

    Returns Promise<Buffer[]>

    Resolved with message parts that were successfully read.

  • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

    await socket.send("hello world")
    await socket.send(["hello", "world"]) +

    Queueing may fail eventually if the socket has been configured with a sendTimeout.

    A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

    Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

    The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

    For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

    • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

      • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

      • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

    • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

    • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

    Parameters

    • message: MessageLike | MessageLike[]

      Single message or multipart message to queue for sending.

    • ...options: []

      Any options, if applicable to the socket type (DRAFT only).

    Returns Promise<void>

    Resolved when the message was successfully queued.

  • Parameters

    • option: number
    • value: boolean

    Returns void

  • Parameters

    • option: number
    • value: null | string | Buffer

    Returns void

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns Promise<void>

    Resolved when the socket was successfully unbound.

  • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

    Parameters

    • address: string

      Address to unbind this socket from.

    Returns void

    Resolved when the socket was successfully unbound.

\ No newline at end of file diff --git a/classes/Socket.html b/classes/Socket.html index 3853b53c..9bc79054 100644 --- a/classes/Socket.html +++ b/classes/Socket.html @@ -1,5 +1,6 @@ -Socket | zeromq.js

Class SocketAbstract

A ØMQ socket. This class should generally not be used directly. Instead, create one of its subclasses that corresponds to the socket type you want to use.

new zmq.Pair(...)
new zmq.Publisher(...)
new zmq.Subscriber(...)
new zmq.Request(...)
new zmq.Reply(...)
new zmq.Dealer(...)
new zmq.Router(...)
new zmq.Pull(...)
new zmq.Push(...)
new zmq.XPublisher(...)
new zmq.XSubscriber(...)
new zmq.Stream(...) -

Socket options can be set during construction or via a property after the socket was created. Most socket options do not take effect until the next bind() or connect() call. Setting such an option after the socket is already connected or bound will display a warning.

Hierarchy (view full)

Constructors

  • Creates a new socket of the specified type. Subclasses are expected to provide the correct socket type.

    Parameters

    • type: SocketType

      The socket type.

    • Optionaloptions: {}

      Any options to set during construction.

      Returns Socket

    Properties

    affinity: number

    ZMQ_AFFINITY

    I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

    Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

    backlog: number

    ZMQ_BACKLOG

    Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

    closed: boolean

    Whether this socket was previously closed with close().

    connectTimeout: number

    ZMQ_CONNECT_TIMEOUT

    Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

    context: Context

    Context that this socket belongs to.

    curvePublicKey: null | string

    ZMQ_CURVE_PUBLICKEY

    Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

    curveSecretKey: null | string

    ZMQ_CURVE_SECRETKEY

    Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

    curveServer: boolean

    ZMQ_CURVE_SERVER

    Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

    curveServerKey: null | string

    ZMQ_CURVE_SERVERKEY

    Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

    events: Observer

    Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

    gssapiPlainText: boolean
    gssapiPrincipal: null | string
    gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    gssapiServer: boolean
    gssapiServicePrincipal: null | string
    gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    handshakeInterval: number

    ZMQ_HANDSHAKE_IVL

    Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

    heartbeatInterval: number

    ZMQ_HEARTBEAT_IVL

    Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

    heartbeatTimeout: number

    ZMQ_HEARTBEAT_TIMEOUT

    How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

    heartbeatTimeToLive: number

    ZMQ_HEARTBEAT_TTL

    The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

    immediate: boolean

    ZMQ_IMMEDIATE

    By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

    interface: null | string

    ZMQ_BINDTODEVICE

    Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

    ipv6: boolean

    ZMQ_IPV6

    Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

    lastEndpoint: null | string

    ZMQ_LAST_ENDPOINT

    The last endpoint bound for TCP and IPC transports.

    linger: number

    ZMQ_LINGER

    Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

    loopbackFastPath: boolean

    ZMQ_LOOPBACK_FASTPATH

    Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

    maxMessageSize: number

    ZMQ_MAXMSGSIZE

    Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

    multicastMaxTransportDataUnit: number

    ZMQ_MULTICAST_MAXTPDU

    Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

    plainPassword: null | string

    ZMQ_PLAIN_PASSWORD

    Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    plainServer: boolean

    ZMQ_PLAIN_SERVER

    Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

    plainUsername: null | string

    ZMQ_PLAIN_USERNAME

    Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    rate: number

    ZMQ_RATE

    Maximum send or receive data rate for multicast transports such as pgm.

    readable: boolean

    Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

    reconnectInterval: number

    ZMQ_RECONNECT_IVL

    Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

    reconnectMaxInterval: number

    ZMQ_RECONNECT_IVL_MAX

    Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

    recoveryInterval: number

    ZMQ_RECOVERY_IVL

    Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

    securityMechanism:
        | null
        | "plain"
        | "curve"
        | "gssapi"

    ZMQ_MECHANISM

    Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

    • null - No security mechanism is used.
    • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
    • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
    • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
    socksProxy: null | string

    ZMQ_SOCKS_PROXY

    The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

    tcpAcceptFilter: null | string

    ZMQ_TCP_ACCEPT_FILTER

    Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

    tcpKeepalive: number

    ZMQ_TCP_KEEPALIVE

    Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveCount: number

    ZMQ_TCP_KEEPALIVE_CNT

    Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveIdle: number

    ZMQ_TCP_KEEPALIVE_IDLE

    Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveInterval: number

    ZMQ_TCP_KEEPALIVE_INTVL

    Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

    tcpMaxRetransmitTimeout: number

    ZMQ_TCP_MAXRT

    Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

    threadSafe: boolean

    ZMQ_THREAD_SAFE

    Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

    type: SocketType

    ZMQ_TYPE

    Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

    typeOfService: number

    ZMQ_TOS

    Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

    vmciBufferMaxSize: number

    ZMQ_VMCI_BUFFER_MAX_SIZE

    Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferMinSize: number

    ZMQ_VMCI_BUFFER_MIN_SIZE

    Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferSize: number

    ZMQ_VMCI_BUFFER_SIZE

    The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciConnectTimeout: number

    ZMQ_VMCI_CONNECT_TIMEOUT

    Connection timeout for the socket. For vmci:// transports only.

    writable: boolean

    Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

    zapDomain: null | string

    ZMQ_ZAP_DOMAIN

    Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

    zapEnforceDomain: boolean

    ZMQ_ZAP_ENFORCE_DOMAIN

    The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Methods

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      await socket.bind("tcp://127.0.0.1:3456")
      await socket.bind("tcp://*:3456") // binds on all interfaces
      await socket.bind("tcp://127.0.0.1:*") // binds on random port -

      Parameters

      • address: string

        Address to bind this socket to.

      Returns Promise<void>

      Resolved when the socket was successfully bound.

    • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

      After this method is called, it is no longer possible to call any other methods on this socket.

      Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

      Calling this method on a socket that is already closed is a no-op.

      Returns void

    • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

      socket.connect("tcp://127.0.0.1:3456")
      -

      Parameters

      • address: string

        The address to connect to.

      Returns void

    • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

      socket.disconnect("tcp://127.0.0.1:3456")
      -

      Parameters

      • address: string

        The previously connected address to disconnect from.

      Returns void

    • Parameters

      • option: number

      Returns boolean

    • Parameters

      • option: number

      Returns number

    • Parameters

      • option: number

      Returns number

    • Parameters

      • option: number

      Returns null | string

    • Parameters

      • option: number

      Returns number

    • Parameters

      • option: number

      Returns number

    • Parameters

      • option: number
      • value: boolean

      Returns void

    • Parameters

      • option: number
      • value: number

      Returns void

    • Parameters

      • option: number
      • value: number

      Returns void

    • Parameters

      • option: number
      • value: null | string | Buffer

      Returns void

    • Parameters

      • option: number
      • value: number

      Returns void

    • Parameters

      • option: number
      • value: number

      Returns void

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns Promise<void>

      Resolved when the socket was successfully unbound.

    \ No newline at end of file +Socket | zeromq.js

    Class SocketAbstract

    A ØMQ socket. This class should generally not be used directly. Instead, create one of its subclasses that corresponds to the socket type you want to use.

    new zmq.Pair(...)
    new zmq.Publisher(...)
    new zmq.Subscriber(...)
    new zmq.Request(...)
    new zmq.Reply(...)
    new zmq.Dealer(...)
    new zmq.Router(...)
    new zmq.Pull(...)
    new zmq.Push(...)
    new zmq.XPublisher(...)
    new zmq.XSubscriber(...)
    new zmq.Stream(...) +

    Socket options can be set during construction or via a property after the socket was created. Most socket options do not take effect until the next bind() or connect() call. Setting such an option after the socket is already connected or bound will display a warning.

    Hierarchy (View Summary)

    Constructors

    • Creates a new socket of the specified type. Subclasses are expected to provide the correct socket type.

      Parameters

      • type: SocketType

        The socket type.

      • Optionaloptions: {}

        Any options to set during construction.

      Returns Socket

    Properties

    affinity: number

    ZMQ_AFFINITY

    I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

    Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

    backlog: number

    ZMQ_BACKLOG

    Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

    closed: boolean

    Whether this socket was previously closed with close().

    connectTimeout: number

    ZMQ_CONNECT_TIMEOUT

    Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

    context: Context

    Context that this socket belongs to.

    curvePublicKey: null | string

    ZMQ_CURVE_PUBLICKEY

    Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

    curveSecretKey: null | string

    ZMQ_CURVE_SECRETKEY

    Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

    curveServer: boolean

    ZMQ_CURVE_SERVER

    Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

    curveServerKey: null | string

    ZMQ_CURVE_SERVERKEY

    Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

    events: Observer

    Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

    gssapiPlainText: boolean
    gssapiPrincipal: null | string
    gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    gssapiServer: boolean
    gssapiServicePrincipal: null | string
    gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    handshakeInterval: number

    ZMQ_HANDSHAKE_IVL

    Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

    heartbeatInterval: number

    ZMQ_HEARTBEAT_IVL

    Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

    heartbeatTimeout: number

    ZMQ_HEARTBEAT_TIMEOUT

    How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

    heartbeatTimeToLive: number

    ZMQ_HEARTBEAT_TTL

    The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

    immediate: boolean

    ZMQ_IMMEDIATE

    By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

    interface: null | string

    ZMQ_BINDTODEVICE

    Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

    ipv6: boolean

    ZMQ_IPV6

    Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

    lastEndpoint: null | string

    ZMQ_LAST_ENDPOINT

    The last endpoint bound for TCP and IPC transports.

    linger: number

    ZMQ_LINGER

    Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

    loopbackFastPath: boolean

    ZMQ_LOOPBACK_FASTPATH

    Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

    maxMessageSize: number

    ZMQ_MAXMSGSIZE

    Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

    multicastMaxTransportDataUnit: number

    ZMQ_MULTICAST_MAXTPDU

    Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

    plainPassword: null | string

    ZMQ_PLAIN_PASSWORD

    Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    plainServer: boolean

    ZMQ_PLAIN_SERVER

    Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

    plainUsername: null | string

    ZMQ_PLAIN_USERNAME

    Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    rate: number

    ZMQ_RATE

    Maximum send or receive data rate for multicast transports such as pgm.

    readable: boolean

    Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

    reconnectInterval: number

    ZMQ_RECONNECT_IVL

    Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

    reconnectMaxInterval: number

    ZMQ_RECONNECT_IVL_MAX

    Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

    recoveryInterval: number

    ZMQ_RECOVERY_IVL

    Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

    securityMechanism: null | "plain" | "curve" | "gssapi"

    ZMQ_MECHANISM

    Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

    • null - No security mechanism is used.
    • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
    • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
    • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
    socksProxy: null | string

    ZMQ_SOCKS_PROXY

    The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

    tcpAcceptFilter: null | string

    ZMQ_TCP_ACCEPT_FILTER

    Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

    tcpKeepalive: number

    ZMQ_TCP_KEEPALIVE

    Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveCount: number

    ZMQ_TCP_KEEPALIVE_CNT

    Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveIdle: number

    ZMQ_TCP_KEEPALIVE_IDLE

    Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveInterval: number

    ZMQ_TCP_KEEPALIVE_INTVL

    Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

    tcpMaxRetransmitTimeout: number

    ZMQ_TCP_MAXRT

    Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

    threadSafe: boolean

    ZMQ_THREAD_SAFE

    Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

    type: SocketType

    ZMQ_TYPE

    Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

    typeOfService: number

    ZMQ_TOS

    Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

    vmciBufferMaxSize: number

    ZMQ_VMCI_BUFFER_MAX_SIZE

    Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferMinSize: number

    ZMQ_VMCI_BUFFER_MIN_SIZE

    Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferSize: number

    ZMQ_VMCI_BUFFER_SIZE

    The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciConnectTimeout: number

    ZMQ_VMCI_CONNECT_TIMEOUT

    Connection timeout for the socket. For vmci:// transports only.

    writable: boolean

    Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

    zapDomain: null | string

    ZMQ_ZAP_DOMAIN

    Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

    zapEnforceDomain: boolean

    ZMQ_ZAP_ENFORCE_DOMAIN

    The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Methods

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      await socket.bind("tcp://127.0.0.1:3456")
      await socket.bind("tcp://*:3456") // binds on all interfaces
      await socket.bind("tcp://127.0.0.1:*") // binds on random port +

      Parameters

      • address: string

        Address to bind this socket to.

      Returns Promise<void>

      Resolved when the socket was successfully bound.

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      socket.bindSync("tcp://127.0.0.1:3456")
      socket.bindSync("tcp://*:3456") // binds on all interfaces
      socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

      Parameters

      • address: string

        Address to bind this socket to.

      Returns void

      Resolved when the socket was successfully bound.

    • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

      After this method is called, it is no longer possible to call any other methods on this socket.

      Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

      Calling this method on a socket that is already closed is a no-op.

      Returns void

    • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

      socket.connect("tcp://127.0.0.1:3456")
      +

      Parameters

      • address: string

        The address to connect to.

      Returns void

    • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

      socket.disconnect("tcp://127.0.0.1:3456")
      +

      Parameters

      • address: string

        The previously connected address to disconnect from.

      Returns void

    • Parameters

      • option: number

      Returns boolean

    • Parameters

      • option: number

      Returns number

    • Parameters

      • option: number

      Returns number

    • Parameters

      • option: number

      Returns null | string

    • Parameters

      • option: number

      Returns number

    • Parameters

      • option: number

      Returns number

    • Parameters

      • option: number
      • value: boolean

      Returns void

    • Parameters

      • option: number
      • value: number

      Returns void

    • Parameters

      • option: number
      • value: number

      Returns void

    • Parameters

      • option: number
      • value: null | string | Buffer

      Returns void

    • Parameters

      • option: number
      • value: number

      Returns void

    • Parameters

      • option: number
      • value: number

      Returns void

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns Promise<void>

      Resolved when the socket was successfully unbound.

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns void

      Resolved when the socket was successfully unbound.

    \ No newline at end of file diff --git a/classes/Stream.html b/classes/Stream.html index cdf32074..a8467330 100644 --- a/classes/Stream.html +++ b/classes/Stream.html @@ -1,7 +1,8 @@ -Stream | zeromq.js

    Class Stream

    A Stream is used to send and receive TCP data from a non-ØMQ peer with the tcp:// transport. A Stream can act as client and/or server, sending and/or receiving TCP data asynchronously.

    When sending and receiving data with Writable.send() and Readable.receive(), the first message part shall be the routing id of the peer. Unroutable messages will cause an error.

    When a connection is made to a Stream, a zero-length message will be received. Similarly, when the peer disconnects (or the connection is lost), a zero-length message will be received.

    To close a specific connection, Writable.send() the routing id frame followed by a zero-length message.

    To open a connection to a server, use Stream.connect().

    Hierarchy (view full)

    Constructors

    • Parameters

      • Optionaloptions: {
            affinity?: number;
            backlog?: number;
            connectTimeout?: number;
            context?: Context;
            curvePublicKey?: null | string;
            curveSecretKey?: null | string;
            curveServer?: boolean;
            curveServerKey?: null | string;
            gssapiPlainText?: boolean;
            gssapiPrincipal?: null | string;
            gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            gssapiServer?: boolean;
            gssapiServicePrincipal?: null | string;
            gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            handshakeInterval?: number;
            heartbeatInterval?: number;
            heartbeatTimeout?: number;
            heartbeatTimeToLive?: number;
            immediate?: boolean;
            interface?: null | string;
            ipv6?: boolean;
            linger?: number;
            loopbackFastPath?: boolean;
            maxMessageSize?: number;
            multicastHops?: number;
            multicastMaxTransportDataUnit?: number;
            notify?: boolean;
            plainPassword?: null | string;
            plainServer?: boolean;
            plainUsername?: null | string;
            rate?: number;
            receiveBufferSize?: number;
            receiveHighWaterMark?: number;
            receiveTimeout?: number;
            reconnectInterval?: number;
            reconnectMaxInterval?: number;
            recoveryInterval?: number;
            sendBufferSize?: number;
            sendHighWaterMark?: number;
            sendTimeout?: number;
            socksProxy?: null | string;
            tcpAcceptFilter?: null | string;
            tcpKeepalive?: number;
            tcpKeepaliveCount?: number;
            tcpKeepaliveIdle?: number;
            tcpKeepaliveInterval?: number;
            tcpMaxRetransmitTimeout?: number;
            typeOfService?: number;
            vmciBufferMaxSize?: number;
            vmciBufferMinSize?: number;
            vmciBufferSize?: number;
            vmciConnectTimeout?: number;
            zapDomain?: null | string;
            zapEnforceDomain?: boolean;
        }
        • Optionalaffinity?: number

          ZMQ_AFFINITY

          I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

          Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

        • Optionalbacklog?: number

          ZMQ_BACKLOG

          Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

        • OptionalconnectTimeout?: number

          ZMQ_CONNECT_TIMEOUT

          Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

        • Optionalcontext?: Context
        • OptionalcurvePublicKey?: null | string

          ZMQ_CURVE_PUBLICKEY

          Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

        • OptionalcurveSecretKey?: null | string

          ZMQ_CURVE_SECRETKEY

          Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

        • OptionalcurveServer?: boolean

          ZMQ_CURVE_SERVER

          Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

        • OptionalcurveServerKey?: null | string

          ZMQ_CURVE_SERVERKEY

          Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

        • OptionalgssapiPlainText?: boolean
        • OptionalgssapiPrincipal?: null | string
        • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalgssapiServer?: boolean
        • OptionalgssapiServicePrincipal?: null | string
        • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalhandshakeInterval?: number

          ZMQ_HANDSHAKE_IVL

          Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

        • OptionalheartbeatInterval?: number

          ZMQ_HEARTBEAT_IVL

          Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

        • OptionalheartbeatTimeout?: number

          ZMQ_HEARTBEAT_TIMEOUT

          How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

        • OptionalheartbeatTimeToLive?: number

          ZMQ_HEARTBEAT_TTL

          The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

        • Optionalimmediate?: boolean

          ZMQ_IMMEDIATE

          By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

        • Optionalinterface?: null | string

          ZMQ_BINDTODEVICE

          Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

        • Optionalipv6?: boolean

          ZMQ_IPV6

          Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

        • Optionallinger?: number

          ZMQ_LINGER

          Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

        • OptionalloopbackFastPath?: boolean

          ZMQ_LOOPBACK_FASTPATH

          Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

        • OptionalmaxMessageSize?: number

          ZMQ_MAXMSGSIZE

          Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

        • OptionalmulticastHops?: number

          ZMQ_MULTICAST_HOPS

          Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

        • OptionalmulticastMaxTransportDataUnit?: number

          ZMQ_MULTICAST_MAXTPDU

          Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

        • Optionalnotify?: boolean

          ZMQ_STREAM_NOTIFY

          Enables connect and disconnect notifications on a Stream when set to true. When notifications are enabled, the socket delivers a zero-length message when a peer connects or disconnects.

        • OptionalplainPassword?: null | string

          ZMQ_PLAIN_PASSWORD

          Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • OptionalplainServer?: boolean

          ZMQ_PLAIN_SERVER

          Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

        • OptionalplainUsername?: null | string

          ZMQ_PLAIN_USERNAME

          Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • Optionalrate?: number

          ZMQ_RATE

          Maximum send or receive data rate for multicast transports such as pgm.

        • OptionalreceiveBufferSize?: number

          ZMQ_RCVBUF

          Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalreceiveHighWaterMark?: number

          ZMQ_RCVHWM

          The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalreceiveTimeout?: number

          ZMQ_RCVTIMEO

          Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

        • OptionalreconnectInterval?: number

          ZMQ_RECONNECT_IVL

          Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

        • OptionalreconnectMaxInterval?: number

          ZMQ_RECONNECT_IVL_MAX

          Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

        • OptionalrecoveryInterval?: number

          ZMQ_RECOVERY_IVL

          Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

        • OptionalsendBufferSize?: number

          ZMQ_SNDBUF

          Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalsendHighWaterMark?: number

          ZMQ_SNDHWM

          The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalsendTimeout?: number

          ZMQ_SNDTIMEO

          Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

        • OptionalsocksProxy?: null | string

          ZMQ_SOCKS_PROXY

          The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

        • OptionaltcpAcceptFilter?: null | string

          ZMQ_TCP_ACCEPT_FILTER

          Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

        • OptionaltcpKeepalive?: number

          ZMQ_TCP_KEEPALIVE

          Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveCount?: number

          ZMQ_TCP_KEEPALIVE_CNT

          Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveIdle?: number

          ZMQ_TCP_KEEPALIVE_IDLE

          Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveInterval?: number

          ZMQ_TCP_KEEPALIVE_INTVL

          Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpMaxRetransmitTimeout?: number

          ZMQ_TCP_MAXRT

          Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

        • OptionaltypeOfService?: number

          ZMQ_TOS

          Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

        • OptionalvmciBufferMaxSize?: number

          ZMQ_VMCI_BUFFER_MAX_SIZE

          Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferMinSize?: number

          ZMQ_VMCI_BUFFER_MIN_SIZE

          Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferSize?: number

          ZMQ_VMCI_BUFFER_SIZE

          The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciConnectTimeout?: number

          ZMQ_VMCI_CONNECT_TIMEOUT

          Connection timeout for the socket. For vmci:// transports only.

        • OptionalzapDomain?: null | string

          ZMQ_ZAP_DOMAIN

          Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

        • OptionalzapEnforceDomain?: boolean

          ZMQ_ZAP_ENFORCE_DOMAIN

          The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

      Returns Stream

    Properties

    affinity: number

    ZMQ_AFFINITY

    I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

    Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

    backlog: number

    ZMQ_BACKLOG

    Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

    closed: boolean

    Whether this socket was previously closed with close().

    connectTimeout: number

    ZMQ_CONNECT_TIMEOUT

    Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

    context: Context

    Context that this socket belongs to.

    curvePublicKey: null | string

    ZMQ_CURVE_PUBLICKEY

    Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

    curveSecretKey: null | string

    ZMQ_CURVE_SECRETKEY

    Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

    curveServer: boolean

    ZMQ_CURVE_SERVER

    Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

    curveServerKey: null | string

    ZMQ_CURVE_SERVERKEY

    Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

    events: Observer

    Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

    gssapiPlainText: boolean
    gssapiPrincipal: null | string
    gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    gssapiServer: boolean
    gssapiServicePrincipal: null | string
    gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    handshakeInterval: number

    ZMQ_HANDSHAKE_IVL

    Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

    heartbeatInterval: number

    ZMQ_HEARTBEAT_IVL

    Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

    heartbeatTimeout: number

    ZMQ_HEARTBEAT_TIMEOUT

    How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

    heartbeatTimeToLive: number

    ZMQ_HEARTBEAT_TTL

    The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

    immediate: boolean

    ZMQ_IMMEDIATE

    By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

    interface: null | string

    ZMQ_BINDTODEVICE

    Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

    ipv6: boolean

    ZMQ_IPV6

    Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

    lastEndpoint: null | string

    ZMQ_LAST_ENDPOINT

    The last endpoint bound for TCP and IPC transports.

    linger: number

    ZMQ_LINGER

    Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

    loopbackFastPath: boolean

    ZMQ_LOOPBACK_FASTPATH

    Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

    maxMessageSize: number

    ZMQ_MAXMSGSIZE

    Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

    multicastHops: number

    ZMQ_MULTICAST_HOPS

    Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

    multicastMaxTransportDataUnit: number

    ZMQ_MULTICAST_MAXTPDU

    Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

    notify: boolean

    ZMQ_STREAM_NOTIFY

    Enables connect and disconnect notifications on a Stream when set to true. When notifications are enabled, the socket delivers a zero-length message when a peer connects or disconnects.

    plainPassword: null | string

    ZMQ_PLAIN_PASSWORD

    Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    plainServer: boolean

    ZMQ_PLAIN_SERVER

    Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

    plainUsername: null | string

    ZMQ_PLAIN_USERNAME

    Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    rate: number

    ZMQ_RATE

    Maximum send or receive data rate for multicast transports such as pgm.

    readable: boolean

    Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

    receiveBufferSize: number

    ZMQ_RCVBUF

    Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

    receiveHighWaterMark: number

    ZMQ_RCVHWM

    The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    receiveTimeout: number

    ZMQ_RCVTIMEO

    Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

    reconnectInterval: number

    ZMQ_RECONNECT_IVL

    Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

    reconnectMaxInterval: number

    ZMQ_RECONNECT_IVL_MAX

    Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

    recoveryInterval: number

    ZMQ_RECOVERY_IVL

    Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

    securityMechanism:
        | null
        | "plain"
        | "curve"
        | "gssapi"

    ZMQ_MECHANISM

    Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

    • null - No security mechanism is used.
    • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
    • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
    • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
    sendBufferSize: number

    ZMQ_SNDBUF

    Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

    sendHighWaterMark: number

    ZMQ_SNDHWM

    The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    sendTimeout: number

    ZMQ_SNDTIMEO

    Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

    socksProxy: null | string

    ZMQ_SOCKS_PROXY

    The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

    tcpAcceptFilter: null | string

    ZMQ_TCP_ACCEPT_FILTER

    Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

    tcpKeepalive: number

    ZMQ_TCP_KEEPALIVE

    Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveCount: number

    ZMQ_TCP_KEEPALIVE_CNT

    Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveIdle: number

    ZMQ_TCP_KEEPALIVE_IDLE

    Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveInterval: number

    ZMQ_TCP_KEEPALIVE_INTVL

    Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

    tcpMaxRetransmitTimeout: number

    ZMQ_TCP_MAXRT

    Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

    threadSafe: boolean

    ZMQ_THREAD_SAFE

    Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

    type: SocketType

    ZMQ_TYPE

    Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

    typeOfService: number

    ZMQ_TOS

    Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

    vmciBufferMaxSize: number

    ZMQ_VMCI_BUFFER_MAX_SIZE

    Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferMinSize: number

    ZMQ_VMCI_BUFFER_MIN_SIZE

    Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferSize: number

    ZMQ_VMCI_BUFFER_SIZE

    The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciConnectTimeout: number

    ZMQ_VMCI_CONNECT_TIMEOUT

    Connection timeout for the socket. For vmci:// transports only.

    writable: boolean

    Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

    zapDomain: null | string

    ZMQ_ZAP_DOMAIN

    Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

    zapEnforceDomain: boolean

    ZMQ_ZAP_ENFORCE_DOMAIN

    The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Methods

    • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

      for await (const [msg] of socket) {
      // handle messages
      } -

      Returns AsyncIterator<[Buffer, Buffer], undefined, undefined>

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      await socket.bind("tcp://127.0.0.1:3456")
      await socket.bind("tcp://*:3456") // binds on all interfaces
      await socket.bind("tcp://127.0.0.1:*") // binds on random port -

      Parameters

      • address: string

        Address to bind this socket to.

      Returns Promise<void>

      Resolved when the socket was successfully bound.

    • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

      After this method is called, it is no longer possible to call any other methods on this socket.

      Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

      Calling this method on a socket that is already closed is a no-op.

      Returns void

    • Connects to the given remote address. To specificy a specific routing id, provide a routingId option. The identity should be unique, from 1 to 255 bytes long and MAY NOT start with binary zero.

      Parameters

      • address: string

        The tcp:// address to connect to.

      • options: StreamConnectOptions = {}

        Any connection options.

      Returns void

    • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

      socket.disconnect("tcp://127.0.0.1:3456")
      -

      Parameters

      • address: string

        The previously connected address to disconnect from.

      Returns void

    • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

      const [msg] = await socket.receive()
      const [part1, part2] = await socket.receive() -

      Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

      A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

      Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

      socket.receive() // -> pending promise until read is possible
      socket.receive() // -> promise rejection with `EBUSY` error -

      Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

      Returns Promise<[Buffer, Buffer]>

      Resolved with message parts that were successfully read.

    • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

      await socket.send("hello world")
      await socket.send(["hello", "world"]) -

      Queueing may fail eventually if the socket has been configured with a sendTimeout.

      A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

      Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

      The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

      For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

      • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

        • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

        • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

      • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

      • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

      Parameters

      • message: [MessageLike, MessageLike]

        Single message or multipart message to queue for sending.

      • Rest...options: []

        Any options, if applicable to the socket type (DRAFT only).

      Returns Promise<void>

      Resolved when the message was successfully queued.

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns Promise<void>

      Resolved when the socket was successfully unbound.

    \ No newline at end of file +Stream | zeromq.js

    Class Stream

    A Stream is used to send and receive TCP data from a non-ØMQ peer with the tcp:// transport. A Stream can act as client and/or server, sending and/or receiving TCP data asynchronously.

    When sending and receiving data with Writable.send() and Readable.receive(), the first message part shall be the routing id of the peer. Unroutable messages will cause an error.

    When a connection is made to a Stream, a zero-length message will be received. Similarly, when the peer disconnects (or the connection is lost), a zero-length message will be received.

    To close a specific connection, Writable.send() the routing id frame followed by a zero-length message.

    To open a connection to a server, use Stream.connect().

    Hierarchy (View Summary)

    Constructors

    • Parameters

      • Optionaloptions: {
            affinity?: number;
            backlog?: number;
            connectTimeout?: number;
            context?: Context;
            curvePublicKey?: null | string;
            curveSecretKey?: null | string;
            curveServer?: boolean;
            curveServerKey?: null | string;
            gssapiPlainText?: boolean;
            gssapiPrincipal?: null | string;
            gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            gssapiServer?: boolean;
            gssapiServicePrincipal?: null | string;
            gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            handshakeInterval?: number;
            heartbeatInterval?: number;
            heartbeatTimeout?: number;
            heartbeatTimeToLive?: number;
            immediate?: boolean;
            interface?: null | string;
            ipv6?: boolean;
            linger?: number;
            loopbackFastPath?: boolean;
            maxMessageSize?: number;
            multicastHops?: number;
            multicastMaxTransportDataUnit?: number;
            notify?: boolean;
            plainPassword?: null | string;
            plainServer?: boolean;
            plainUsername?: null | string;
            rate?: number;
            receiveBufferSize?: number;
            receiveHighWaterMark?: number;
            receiveTimeout?: number;
            reconnectInterval?: number;
            reconnectMaxInterval?: number;
            recoveryInterval?: number;
            sendBufferSize?: number;
            sendHighWaterMark?: number;
            sendTimeout?: number;
            socksProxy?: null | string;
            tcpAcceptFilter?: null | string;
            tcpKeepalive?: number;
            tcpKeepaliveCount?: number;
            tcpKeepaliveIdle?: number;
            tcpKeepaliveInterval?: number;
            tcpMaxRetransmitTimeout?: number;
            typeOfService?: number;
            vmciBufferMaxSize?: number;
            vmciBufferMinSize?: number;
            vmciBufferSize?: number;
            vmciConnectTimeout?: number;
            zapDomain?: null | string;
            zapEnforceDomain?: boolean;
        }
        • Optionalaffinity?: number

          ZMQ_AFFINITY

          I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

          Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

        • Optionalbacklog?: number

          ZMQ_BACKLOG

          Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

        • OptionalconnectTimeout?: number

          ZMQ_CONNECT_TIMEOUT

          Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

        • Optionalcontext?: Context
        • OptionalcurvePublicKey?: null | string

          ZMQ_CURVE_PUBLICKEY

          Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

        • OptionalcurveSecretKey?: null | string

          ZMQ_CURVE_SECRETKEY

          Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

        • OptionalcurveServer?: boolean

          ZMQ_CURVE_SERVER

          Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

        • OptionalcurveServerKey?: null | string

          ZMQ_CURVE_SERVERKEY

          Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

        • OptionalgssapiPlainText?: boolean
        • OptionalgssapiPrincipal?: null | string
        • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalgssapiServer?: boolean
        • OptionalgssapiServicePrincipal?: null | string
        • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalhandshakeInterval?: number

          ZMQ_HANDSHAKE_IVL

          Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

        • OptionalheartbeatInterval?: number

          ZMQ_HEARTBEAT_IVL

          Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

        • OptionalheartbeatTimeout?: number

          ZMQ_HEARTBEAT_TIMEOUT

          How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

        • OptionalheartbeatTimeToLive?: number

          ZMQ_HEARTBEAT_TTL

          The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

        • Optionalimmediate?: boolean

          ZMQ_IMMEDIATE

          By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

        • Optionalinterface?: null | string

          ZMQ_BINDTODEVICE

          Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

        • Optionalipv6?: boolean

          ZMQ_IPV6

          Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

        • Optionallinger?: number

          ZMQ_LINGER

          Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

        • OptionalloopbackFastPath?: boolean

          ZMQ_LOOPBACK_FASTPATH

          Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

        • OptionalmaxMessageSize?: number

          ZMQ_MAXMSGSIZE

          Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

        • OptionalmulticastHops?: number

          ZMQ_MULTICAST_HOPS

          Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

        • OptionalmulticastMaxTransportDataUnit?: number

          ZMQ_MULTICAST_MAXTPDU

          Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

        • Optionalnotify?: boolean

          ZMQ_STREAM_NOTIFY

          Enables connect and disconnect notifications on a Stream when set to true. When notifications are enabled, the socket delivers a zero-length message when a peer connects or disconnects.

        • OptionalplainPassword?: null | string

          ZMQ_PLAIN_PASSWORD

          Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • OptionalplainServer?: boolean

          ZMQ_PLAIN_SERVER

          Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

        • OptionalplainUsername?: null | string

          ZMQ_PLAIN_USERNAME

          Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • Optionalrate?: number

          ZMQ_RATE

          Maximum send or receive data rate for multicast transports such as pgm.

        • OptionalreceiveBufferSize?: number

          ZMQ_RCVBUF

          Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalreceiveHighWaterMark?: number

          ZMQ_RCVHWM

          The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalreceiveTimeout?: number

          ZMQ_RCVTIMEO

          Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

        • OptionalreconnectInterval?: number

          ZMQ_RECONNECT_IVL

          Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

        • OptionalreconnectMaxInterval?: number

          ZMQ_RECONNECT_IVL_MAX

          Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

        • OptionalrecoveryInterval?: number

          ZMQ_RECOVERY_IVL

          Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

        • OptionalsendBufferSize?: number

          ZMQ_SNDBUF

          Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalsendHighWaterMark?: number

          ZMQ_SNDHWM

          The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalsendTimeout?: number

          ZMQ_SNDTIMEO

          Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

        • OptionalsocksProxy?: null | string

          ZMQ_SOCKS_PROXY

          The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

        • OptionaltcpAcceptFilter?: null | string

          ZMQ_TCP_ACCEPT_FILTER

          Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

        • OptionaltcpKeepalive?: number

          ZMQ_TCP_KEEPALIVE

          Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveCount?: number

          ZMQ_TCP_KEEPALIVE_CNT

          Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveIdle?: number

          ZMQ_TCP_KEEPALIVE_IDLE

          Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveInterval?: number

          ZMQ_TCP_KEEPALIVE_INTVL

          Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpMaxRetransmitTimeout?: number

          ZMQ_TCP_MAXRT

          Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

        • OptionaltypeOfService?: number

          ZMQ_TOS

          Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

        • OptionalvmciBufferMaxSize?: number

          ZMQ_VMCI_BUFFER_MAX_SIZE

          Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferMinSize?: number

          ZMQ_VMCI_BUFFER_MIN_SIZE

          Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferSize?: number

          ZMQ_VMCI_BUFFER_SIZE

          The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciConnectTimeout?: number

          ZMQ_VMCI_CONNECT_TIMEOUT

          Connection timeout for the socket. For vmci:// transports only.

        • OptionalzapDomain?: null | string

          ZMQ_ZAP_DOMAIN

          Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

        • OptionalzapEnforceDomain?: boolean

          ZMQ_ZAP_ENFORCE_DOMAIN

          The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

      Returns Stream

    Properties

    affinity: number

    ZMQ_AFFINITY

    I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

    Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

    backlog: number

    ZMQ_BACKLOG

    Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

    closed: boolean

    Whether this socket was previously closed with close().

    connectTimeout: number

    ZMQ_CONNECT_TIMEOUT

    Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

    context: Context

    Context that this socket belongs to.

    curvePublicKey: null | string

    ZMQ_CURVE_PUBLICKEY

    Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

    curveSecretKey: null | string

    ZMQ_CURVE_SECRETKEY

    Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

    curveServer: boolean

    ZMQ_CURVE_SERVER

    Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

    curveServerKey: null | string

    ZMQ_CURVE_SERVERKEY

    Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

    events: Observer

    Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

    gssapiPlainText: boolean
    gssapiPrincipal: null | string
    gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    gssapiServer: boolean
    gssapiServicePrincipal: null | string
    gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    handshakeInterval: number

    ZMQ_HANDSHAKE_IVL

    Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

    heartbeatInterval: number

    ZMQ_HEARTBEAT_IVL

    Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

    heartbeatTimeout: number

    ZMQ_HEARTBEAT_TIMEOUT

    How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

    heartbeatTimeToLive: number

    ZMQ_HEARTBEAT_TTL

    The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

    immediate: boolean

    ZMQ_IMMEDIATE

    By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

    interface: null | string

    ZMQ_BINDTODEVICE

    Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

    ipv6: boolean

    ZMQ_IPV6

    Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

    lastEndpoint: null | string

    ZMQ_LAST_ENDPOINT

    The last endpoint bound for TCP and IPC transports.

    linger: number

    ZMQ_LINGER

    Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

    loopbackFastPath: boolean

    ZMQ_LOOPBACK_FASTPATH

    Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

    maxMessageSize: number

    ZMQ_MAXMSGSIZE

    Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

    multicastHops: number

    ZMQ_MULTICAST_HOPS

    Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

    multicastMaxTransportDataUnit: number

    ZMQ_MULTICAST_MAXTPDU

    Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

    notify: boolean

    ZMQ_STREAM_NOTIFY

    Enables connect and disconnect notifications on a Stream when set to true. When notifications are enabled, the socket delivers a zero-length message when a peer connects or disconnects.

    plainPassword: null | string

    ZMQ_PLAIN_PASSWORD

    Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    plainServer: boolean

    ZMQ_PLAIN_SERVER

    Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

    plainUsername: null | string

    ZMQ_PLAIN_USERNAME

    Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    rate: number

    ZMQ_RATE

    Maximum send or receive data rate for multicast transports such as pgm.

    readable: boolean

    Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

    receiveBufferSize: number

    ZMQ_RCVBUF

    Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

    receiveHighWaterMark: number

    ZMQ_RCVHWM

    The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    receiveTimeout: number

    ZMQ_RCVTIMEO

    Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

    reconnectInterval: number

    ZMQ_RECONNECT_IVL

    Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

    reconnectMaxInterval: number

    ZMQ_RECONNECT_IVL_MAX

    Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

    recoveryInterval: number

    ZMQ_RECOVERY_IVL

    Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

    securityMechanism: null | "plain" | "curve" | "gssapi"

    ZMQ_MECHANISM

    Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

    • null - No security mechanism is used.
    • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
    • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
    • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
    sendBufferSize: number

    ZMQ_SNDBUF

    Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

    sendHighWaterMark: number

    ZMQ_SNDHWM

    The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    sendTimeout: number

    ZMQ_SNDTIMEO

    Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

    socksProxy: null | string

    ZMQ_SOCKS_PROXY

    The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

    tcpAcceptFilter: null | string

    ZMQ_TCP_ACCEPT_FILTER

    Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

    tcpKeepalive: number

    ZMQ_TCP_KEEPALIVE

    Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveCount: number

    ZMQ_TCP_KEEPALIVE_CNT

    Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveIdle: number

    ZMQ_TCP_KEEPALIVE_IDLE

    Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveInterval: number

    ZMQ_TCP_KEEPALIVE_INTVL

    Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

    tcpMaxRetransmitTimeout: number

    ZMQ_TCP_MAXRT

    Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

    threadSafe: boolean

    ZMQ_THREAD_SAFE

    Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

    type: SocketType

    ZMQ_TYPE

    Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

    typeOfService: number

    ZMQ_TOS

    Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

    vmciBufferMaxSize: number

    ZMQ_VMCI_BUFFER_MAX_SIZE

    Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferMinSize: number

    ZMQ_VMCI_BUFFER_MIN_SIZE

    Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferSize: number

    ZMQ_VMCI_BUFFER_SIZE

    The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciConnectTimeout: number

    ZMQ_VMCI_CONNECT_TIMEOUT

    Connection timeout for the socket. For vmci:// transports only.

    writable: boolean

    Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

    zapDomain: null | string

    ZMQ_ZAP_DOMAIN

    Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

    zapEnforceDomain: boolean

    ZMQ_ZAP_ENFORCE_DOMAIN

    The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Methods

    • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

      for await (const [msg] of socket) {
      // handle messages
      } +

      Returns AsyncIterator<[Buffer, Buffer]>

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      await socket.bind("tcp://127.0.0.1:3456")
      await socket.bind("tcp://*:3456") // binds on all interfaces
      await socket.bind("tcp://127.0.0.1:*") // binds on random port +

      Parameters

      • address: string

        Address to bind this socket to.

      Returns Promise<void>

      Resolved when the socket was successfully bound.

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      socket.bindSync("tcp://127.0.0.1:3456")
      socket.bindSync("tcp://*:3456") // binds on all interfaces
      socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

      Parameters

      • address: string

        Address to bind this socket to.

      Returns void

      Resolved when the socket was successfully bound.

    • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

      After this method is called, it is no longer possible to call any other methods on this socket.

      Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

      Calling this method on a socket that is already closed is a no-op.

      Returns void

    • Connects to the given remote address. To specificy a specific routing id, provide a routingId option. The identity should be unique, from 1 to 255 bytes long and MAY NOT start with binary zero.

      Parameters

      • address: string

        The tcp:// address to connect to.

      • options: StreamConnectOptions = {}

        Any connection options.

      Returns void

    • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

      socket.disconnect("tcp://127.0.0.1:3456")
      +

      Parameters

      • address: string

        The previously connected address to disconnect from.

      Returns void

    • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

      const [msg] = await socket.receive()
      const [part1, part2] = await socket.receive() +

      Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

      A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

      Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

      socket.receive() // -> pending promise until read is possible
      socket.receive() // -> promise rejection with `EBUSY` error +

      Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

      Returns Promise<[Buffer, Buffer]>

      Resolved with message parts that were successfully read.

    • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

      await socket.send("hello world")
      await socket.send(["hello", "world"]) +

      Queueing may fail eventually if the socket has been configured with a sendTimeout.

      A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

      Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

      The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

      For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

      • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

        • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

        • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

      • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

      • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

      Parameters

      • message: [MessageLike, MessageLike]

        Single message or multipart message to queue for sending.

      • ...options: []

        Any options, if applicable to the socket type (DRAFT only).

      Returns Promise<void>

      Resolved when the message was successfully queued.

    • Parameters

      • option: number
      • value: boolean

      Returns void

    • Parameters

      • option: number
      • value: null | string | Buffer

      Returns void

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns Promise<void>

      Resolved when the socket was successfully unbound.

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns void

      Resolved when the socket was successfully unbound.

    \ No newline at end of file diff --git a/classes/Subscriber.html b/classes/Subscriber.html index 6f786fcf..62479ed9 100644 --- a/classes/Subscriber.html +++ b/classes/Subscriber.html @@ -1,9 +1,10 @@ -Subscriber | zeromq.js

    Class Subscriber

    A Subscriber socket is used to subscribe to data distributed by a Publisher. Initially a Subscriber is not subscribed to any messages. Use Subscriber.subscribe() to specify which messages to subscribe to. This socket cannot send messages.

    Hierarchy (view full)

    Constructors

    • Parameters

      • Optionaloptions: {
            affinity?: number;
            backlog?: number;
            conflate?: boolean;
            connectTimeout?: number;
            context?: Context;
            curvePublicKey?: null | string;
            curveSecretKey?: null | string;
            curveServer?: boolean;
            curveServerKey?: null | string;
            gssapiPlainText?: boolean;
            gssapiPrincipal?: null | string;
            gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            gssapiServer?: boolean;
            gssapiServicePrincipal?: null | string;
            gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            handshakeInterval?: number;
            heartbeatInterval?: number;
            heartbeatTimeout?: number;
            heartbeatTimeToLive?: number;
            immediate?: boolean;
            interface?: null | string;
            invertMatching?: boolean;
            ipv6?: boolean;
            linger?: number;
            loopbackFastPath?: boolean;
            maxMessageSize?: number;
            multicastMaxTransportDataUnit?: number;
            plainPassword?: null | string;
            plainServer?: boolean;
            plainUsername?: null | string;
            rate?: number;
            receiveBufferSize?: number;
            receiveHighWaterMark?: number;
            receiveTimeout?: number;
            reconnectInterval?: number;
            reconnectMaxInterval?: number;
            recoveryInterval?: number;
            socksProxy?: null | string;
            tcpAcceptFilter?: null | string;
            tcpKeepalive?: number;
            tcpKeepaliveCount?: number;
            tcpKeepaliveIdle?: number;
            tcpKeepaliveInterval?: number;
            tcpMaxRetransmitTimeout?: number;
            typeOfService?: number;
            vmciBufferMaxSize?: number;
            vmciBufferMinSize?: number;
            vmciBufferSize?: number;
            vmciConnectTimeout?: number;
            zapDomain?: null | string;
            zapEnforceDomain?: boolean;
        }
        • Optionalaffinity?: number

          ZMQ_AFFINITY

          I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

          Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

        • Optionalbacklog?: number

          ZMQ_BACKLOG

          Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

        • Optionalconflate?: boolean

          ZMQ_CONFLATE

          If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

        • OptionalconnectTimeout?: number

          ZMQ_CONNECT_TIMEOUT

          Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

        • Optionalcontext?: Context
        • OptionalcurvePublicKey?: null | string

          ZMQ_CURVE_PUBLICKEY

          Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

        • OptionalcurveSecretKey?: null | string

          ZMQ_CURVE_SECRETKEY

          Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

        • OptionalcurveServer?: boolean

          ZMQ_CURVE_SERVER

          Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

        • OptionalcurveServerKey?: null | string

          ZMQ_CURVE_SERVERKEY

          Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

        • OptionalgssapiPlainText?: boolean
        • OptionalgssapiPrincipal?: null | string
        • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalgssapiServer?: boolean
        • OptionalgssapiServicePrincipal?: null | string
        • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalhandshakeInterval?: number

          ZMQ_HANDSHAKE_IVL

          Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

        • OptionalheartbeatInterval?: number

          ZMQ_HEARTBEAT_IVL

          Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

        • OptionalheartbeatTimeout?: number

          ZMQ_HEARTBEAT_TIMEOUT

          How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

        • OptionalheartbeatTimeToLive?: number

          ZMQ_HEARTBEAT_TTL

          The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

        • Optionalimmediate?: boolean

          ZMQ_IMMEDIATE

          By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

        • Optionalinterface?: null | string

          ZMQ_BINDTODEVICE

          Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

        • OptionalinvertMatching?: boolean

          ZMQ_INVERT_MATCHING

          Causes incoming messages that do not match any of the socket's subscriptions to be received by the user.

          All Subscriber sockets connecting to a Publisher must also have the option set to true. Failure to do so will have the Subscriber sockets reject everything the Publisher socket sends them.

        • Optionalipv6?: boolean

          ZMQ_IPV6

          Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

        • Optionallinger?: number

          ZMQ_LINGER

          Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

        • OptionalloopbackFastPath?: boolean

          ZMQ_LOOPBACK_FASTPATH

          Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

        • OptionalmaxMessageSize?: number

          ZMQ_MAXMSGSIZE

          Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

        • OptionalmulticastMaxTransportDataUnit?: number

          ZMQ_MULTICAST_MAXTPDU

          Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

        • OptionalplainPassword?: null | string

          ZMQ_PLAIN_PASSWORD

          Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • OptionalplainServer?: boolean

          ZMQ_PLAIN_SERVER

          Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

        • OptionalplainUsername?: null | string

          ZMQ_PLAIN_USERNAME

          Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • Optionalrate?: number

          ZMQ_RATE

          Maximum send or receive data rate for multicast transports such as pgm.

        • OptionalreceiveBufferSize?: number

          ZMQ_RCVBUF

          Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalreceiveHighWaterMark?: number

          ZMQ_RCVHWM

          The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalreceiveTimeout?: number

          ZMQ_RCVTIMEO

          Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

        • OptionalreconnectInterval?: number

          ZMQ_RECONNECT_IVL

          Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

        • OptionalreconnectMaxInterval?: number

          ZMQ_RECONNECT_IVL_MAX

          Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

        • OptionalrecoveryInterval?: number

          ZMQ_RECOVERY_IVL

          Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

        • OptionalsocksProxy?: null | string

          ZMQ_SOCKS_PROXY

          The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

        • OptionaltcpAcceptFilter?: null | string

          ZMQ_TCP_ACCEPT_FILTER

          Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

        • OptionaltcpKeepalive?: number

          ZMQ_TCP_KEEPALIVE

          Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveCount?: number

          ZMQ_TCP_KEEPALIVE_CNT

          Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveIdle?: number

          ZMQ_TCP_KEEPALIVE_IDLE

          Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveInterval?: number

          ZMQ_TCP_KEEPALIVE_INTVL

          Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpMaxRetransmitTimeout?: number

          ZMQ_TCP_MAXRT

          Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

        • OptionaltypeOfService?: number

          ZMQ_TOS

          Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

        • OptionalvmciBufferMaxSize?: number

          ZMQ_VMCI_BUFFER_MAX_SIZE

          Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferMinSize?: number

          ZMQ_VMCI_BUFFER_MIN_SIZE

          Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferSize?: number

          ZMQ_VMCI_BUFFER_SIZE

          The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciConnectTimeout?: number

          ZMQ_VMCI_CONNECT_TIMEOUT

          Connection timeout for the socket. For vmci:// transports only.

        • OptionalzapDomain?: null | string

          ZMQ_ZAP_DOMAIN

          Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

        • OptionalzapEnforceDomain?: boolean

          ZMQ_ZAP_ENFORCE_DOMAIN

          The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

      Returns Subscriber

    Properties

    affinity: number

    ZMQ_AFFINITY

    I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

    Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

    backlog: number

    ZMQ_BACKLOG

    Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

    closed: boolean

    Whether this socket was previously closed with close().

    conflate: boolean

    ZMQ_CONFLATE

    If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

    connectTimeout: number

    ZMQ_CONNECT_TIMEOUT

    Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

    context: Context

    Context that this socket belongs to.

    curvePublicKey: null | string

    ZMQ_CURVE_PUBLICKEY

    Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

    curveSecretKey: null | string

    ZMQ_CURVE_SECRETKEY

    Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

    curveServer: boolean

    ZMQ_CURVE_SERVER

    Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

    curveServerKey: null | string

    ZMQ_CURVE_SERVERKEY

    Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

    events: Observer

    Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

    gssapiPlainText: boolean
    gssapiPrincipal: null | string
    gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    gssapiServer: boolean
    gssapiServicePrincipal: null | string
    gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    handshakeInterval: number

    ZMQ_HANDSHAKE_IVL

    Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

    heartbeatInterval: number

    ZMQ_HEARTBEAT_IVL

    Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

    heartbeatTimeout: number

    ZMQ_HEARTBEAT_TIMEOUT

    How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

    heartbeatTimeToLive: number

    ZMQ_HEARTBEAT_TTL

    The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

    immediate: boolean

    ZMQ_IMMEDIATE

    By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

    interface: null | string

    ZMQ_BINDTODEVICE

    Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

    invertMatching: boolean

    ZMQ_INVERT_MATCHING

    Causes incoming messages that do not match any of the socket's subscriptions to be received by the user.

    All Subscriber sockets connecting to a Publisher must also have the option set to true. Failure to do so will have the Subscriber sockets reject everything the Publisher socket sends them.

    ipv6: boolean

    ZMQ_IPV6

    Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

    lastEndpoint: null | string

    ZMQ_LAST_ENDPOINT

    The last endpoint bound for TCP and IPC transports.

    linger: number

    ZMQ_LINGER

    Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

    loopbackFastPath: boolean

    ZMQ_LOOPBACK_FASTPATH

    Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

    maxMessageSize: number

    ZMQ_MAXMSGSIZE

    Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

    multicastMaxTransportDataUnit: number

    ZMQ_MULTICAST_MAXTPDU

    Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

    plainPassword: null | string

    ZMQ_PLAIN_PASSWORD

    Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    plainServer: boolean

    ZMQ_PLAIN_SERVER

    Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

    plainUsername: null | string

    ZMQ_PLAIN_USERNAME

    Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    rate: number

    ZMQ_RATE

    Maximum send or receive data rate for multicast transports such as pgm.

    readable: boolean

    Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

    receiveBufferSize: number

    ZMQ_RCVBUF

    Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

    receiveHighWaterMark: number

    ZMQ_RCVHWM

    The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    receiveTimeout: number

    ZMQ_RCVTIMEO

    Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

    reconnectInterval: number

    ZMQ_RECONNECT_IVL

    Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

    reconnectMaxInterval: number

    ZMQ_RECONNECT_IVL_MAX

    Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

    recoveryInterval: number

    ZMQ_RECOVERY_IVL

    Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

    securityMechanism:
        | null
        | "plain"
        | "curve"
        | "gssapi"

    ZMQ_MECHANISM

    Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

    • null - No security mechanism is used.
    • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
    • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
    • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
    socksProxy: null | string

    ZMQ_SOCKS_PROXY

    The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

    tcpAcceptFilter: null | string

    ZMQ_TCP_ACCEPT_FILTER

    Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

    tcpKeepalive: number

    ZMQ_TCP_KEEPALIVE

    Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveCount: number

    ZMQ_TCP_KEEPALIVE_CNT

    Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveIdle: number

    ZMQ_TCP_KEEPALIVE_IDLE

    Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveInterval: number

    ZMQ_TCP_KEEPALIVE_INTVL

    Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

    tcpMaxRetransmitTimeout: number

    ZMQ_TCP_MAXRT

    Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

    threadSafe: boolean

    ZMQ_THREAD_SAFE

    Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

    type: SocketType

    ZMQ_TYPE

    Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

    typeOfService: number

    ZMQ_TOS

    Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

    vmciBufferMaxSize: number

    ZMQ_VMCI_BUFFER_MAX_SIZE

    Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferMinSize: number

    ZMQ_VMCI_BUFFER_MIN_SIZE

    Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferSize: number

    ZMQ_VMCI_BUFFER_SIZE

    The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciConnectTimeout: number

    ZMQ_VMCI_CONNECT_TIMEOUT

    Connection timeout for the socket. For vmci:// transports only.

    writable: boolean

    Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

    zapDomain: null | string

    ZMQ_ZAP_DOMAIN

    Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

    zapEnforceDomain: boolean

    ZMQ_ZAP_ENFORCE_DOMAIN

    The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Methods

    • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

      for await (const [msg] of socket) {
      // handle messages
      } -

      Returns AsyncIterator<Buffer[], undefined, undefined>

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      await socket.bind("tcp://127.0.0.1:3456")
      await socket.bind("tcp://*:3456") // binds on all interfaces
      await socket.bind("tcp://127.0.0.1:*") // binds on random port -

      Parameters

      • address: string

        Address to bind this socket to.

      Returns Promise<void>

      Resolved when the socket was successfully bound.

    • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

      After this method is called, it is no longer possible to call any other methods on this socket.

      Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

      Calling this method on a socket that is already closed is a no-op.

      Returns void

    • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

      socket.connect("tcp://127.0.0.1:3456")
      -

      Parameters

      • address: string

        The address to connect to.

      Returns void

    • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

      socket.disconnect("tcp://127.0.0.1:3456")
      -

      Parameters

      • address: string

        The previously connected address to disconnect from.

      Returns void

    • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

      const [msg] = await socket.receive()
      const [part1, part2] = await socket.receive() -

      Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

      A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

      Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

      socket.receive() // -> pending promise until read is possible
      socket.receive() // -> promise rejection with `EBUSY` error -

      Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

      Returns Promise<Buffer[]>

      Resolved with message parts that were successfully read.

    • Establish a new message filter. Newly created Subsriber sockets will filtered out all incoming messages. Call this method to subscribe to messages beginning with the given prefix.

      Multiple filters may be attached to a single socket, in which case a message shall be accepted if it matches at least one filter. Subscribing without any filters shall subscribe to all incoming messages.

      const sub = new Subscriber()

      // Listen to all messages beginning with 'foo'.
      sub.subscribe("foo")

      // Listen to all incoming messages.
      sub.subscribe() -

      Parameters

      • Rest...prefixes: (string | Buffer)[]

        The prefixes of messages to subscribe to.

      Returns void

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns Promise<void>

      Resolved when the socket was successfully unbound.

    • Remove an existing message filter which was previously established with subscribe(). Stops receiving messages with the given prefix.

      Unsubscribing without any filters shall unsubscribe from the "subscribe all" filter that is added by calling subscribe() without arguments.

      const sub = new Subscriber()

      // Listen to all messages beginning with 'foo'.
      sub.subscribe("foo")
      // ...

      // Stop listening to messages beginning with 'foo'.
      sub.unsubscribe("foo") -

      Parameters

      • Rest...prefixes: (string | Buffer)[]

        The prefixes of messages to subscribe to.

      Returns void

    \ No newline at end of file +Subscriber | zeromq.js

    Class Subscriber

    A Subscriber socket is used to subscribe to data distributed by a Publisher. Initially a Subscriber is not subscribed to any messages. Use Subscriber.subscribe() to specify which messages to subscribe to. This socket cannot send messages.

    Hierarchy (View Summary)

    Constructors

    • Parameters

      • Optionaloptions: {
            affinity?: number;
            backlog?: number;
            conflate?: boolean;
            connectTimeout?: number;
            context?: Context;
            curvePublicKey?: null | string;
            curveSecretKey?: null | string;
            curveServer?: boolean;
            curveServerKey?: null | string;
            gssapiPlainText?: boolean;
            gssapiPrincipal?: null | string;
            gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            gssapiServer?: boolean;
            gssapiServicePrincipal?: null | string;
            gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            handshakeInterval?: number;
            heartbeatInterval?: number;
            heartbeatTimeout?: number;
            heartbeatTimeToLive?: number;
            immediate?: boolean;
            interface?: null | string;
            invertMatching?: boolean;
            ipv6?: boolean;
            linger?: number;
            loopbackFastPath?: boolean;
            maxMessageSize?: number;
            multicastMaxTransportDataUnit?: number;
            plainPassword?: null | string;
            plainServer?: boolean;
            plainUsername?: null | string;
            rate?: number;
            receiveBufferSize?: number;
            receiveHighWaterMark?: number;
            receiveTimeout?: number;
            reconnectInterval?: number;
            reconnectMaxInterval?: number;
            recoveryInterval?: number;
            socksProxy?: null | string;
            tcpAcceptFilter?: null | string;
            tcpKeepalive?: number;
            tcpKeepaliveCount?: number;
            tcpKeepaliveIdle?: number;
            tcpKeepaliveInterval?: number;
            tcpMaxRetransmitTimeout?: number;
            typeOfService?: number;
            vmciBufferMaxSize?: number;
            vmciBufferMinSize?: number;
            vmciBufferSize?: number;
            vmciConnectTimeout?: number;
            zapDomain?: null | string;
            zapEnforceDomain?: boolean;
        }
        • Optionalaffinity?: number

          ZMQ_AFFINITY

          I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

          Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

        • Optionalbacklog?: number

          ZMQ_BACKLOG

          Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

        • Optionalconflate?: boolean

          ZMQ_CONFLATE

          If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

        • OptionalconnectTimeout?: number

          ZMQ_CONNECT_TIMEOUT

          Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

        • Optionalcontext?: Context
        • OptionalcurvePublicKey?: null | string

          ZMQ_CURVE_PUBLICKEY

          Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

        • OptionalcurveSecretKey?: null | string

          ZMQ_CURVE_SECRETKEY

          Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

        • OptionalcurveServer?: boolean

          ZMQ_CURVE_SERVER

          Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

        • OptionalcurveServerKey?: null | string

          ZMQ_CURVE_SERVERKEY

          Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

        • OptionalgssapiPlainText?: boolean
        • OptionalgssapiPrincipal?: null | string
        • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalgssapiServer?: boolean
        • OptionalgssapiServicePrincipal?: null | string
        • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalhandshakeInterval?: number

          ZMQ_HANDSHAKE_IVL

          Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

        • OptionalheartbeatInterval?: number

          ZMQ_HEARTBEAT_IVL

          Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

        • OptionalheartbeatTimeout?: number

          ZMQ_HEARTBEAT_TIMEOUT

          How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

        • OptionalheartbeatTimeToLive?: number

          ZMQ_HEARTBEAT_TTL

          The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

        • Optionalimmediate?: boolean

          ZMQ_IMMEDIATE

          By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

        • Optionalinterface?: null | string

          ZMQ_BINDTODEVICE

          Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

        • OptionalinvertMatching?: boolean

          ZMQ_INVERT_MATCHING

          Causes incoming messages that do not match any of the socket's subscriptions to be received by the user.

          All Subscriber sockets connecting to a Publisher must also have the option set to true. Failure to do so will have the Subscriber sockets reject everything the Publisher socket sends them.

        • Optionalipv6?: boolean

          ZMQ_IPV6

          Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

        • Optionallinger?: number

          ZMQ_LINGER

          Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

        • OptionalloopbackFastPath?: boolean

          ZMQ_LOOPBACK_FASTPATH

          Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

        • OptionalmaxMessageSize?: number

          ZMQ_MAXMSGSIZE

          Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

        • OptionalmulticastMaxTransportDataUnit?: number

          ZMQ_MULTICAST_MAXTPDU

          Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

        • OptionalplainPassword?: null | string

          ZMQ_PLAIN_PASSWORD

          Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • OptionalplainServer?: boolean

          ZMQ_PLAIN_SERVER

          Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

        • OptionalplainUsername?: null | string

          ZMQ_PLAIN_USERNAME

          Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • Optionalrate?: number

          ZMQ_RATE

          Maximum send or receive data rate for multicast transports such as pgm.

        • OptionalreceiveBufferSize?: number

          ZMQ_RCVBUF

          Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalreceiveHighWaterMark?: number

          ZMQ_RCVHWM

          The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalreceiveTimeout?: number

          ZMQ_RCVTIMEO

          Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

        • OptionalreconnectInterval?: number

          ZMQ_RECONNECT_IVL

          Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

        • OptionalreconnectMaxInterval?: number

          ZMQ_RECONNECT_IVL_MAX

          Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

        • OptionalrecoveryInterval?: number

          ZMQ_RECOVERY_IVL

          Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

        • OptionalsocksProxy?: null | string

          ZMQ_SOCKS_PROXY

          The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

        • OptionaltcpAcceptFilter?: null | string

          ZMQ_TCP_ACCEPT_FILTER

          Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

        • OptionaltcpKeepalive?: number

          ZMQ_TCP_KEEPALIVE

          Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveCount?: number

          ZMQ_TCP_KEEPALIVE_CNT

          Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveIdle?: number

          ZMQ_TCP_KEEPALIVE_IDLE

          Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveInterval?: number

          ZMQ_TCP_KEEPALIVE_INTVL

          Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpMaxRetransmitTimeout?: number

          ZMQ_TCP_MAXRT

          Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

        • OptionaltypeOfService?: number

          ZMQ_TOS

          Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

        • OptionalvmciBufferMaxSize?: number

          ZMQ_VMCI_BUFFER_MAX_SIZE

          Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferMinSize?: number

          ZMQ_VMCI_BUFFER_MIN_SIZE

          Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferSize?: number

          ZMQ_VMCI_BUFFER_SIZE

          The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciConnectTimeout?: number

          ZMQ_VMCI_CONNECT_TIMEOUT

          Connection timeout for the socket. For vmci:// transports only.

        • OptionalzapDomain?: null | string

          ZMQ_ZAP_DOMAIN

          Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

        • OptionalzapEnforceDomain?: boolean

          ZMQ_ZAP_ENFORCE_DOMAIN

          The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

      Returns Subscriber

    Properties

    affinity: number

    ZMQ_AFFINITY

    I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

    Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

    backlog: number

    ZMQ_BACKLOG

    Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

    closed: boolean

    Whether this socket was previously closed with close().

    conflate: boolean

    ZMQ_CONFLATE

    If set to true, a socket shall keep only one message in its inbound/outbound queue: the last message to be received/sent. Ignores any high water mark options. Does not support multi-part messages - in particular, only one part of it is kept in the socket internal queue.

    connectTimeout: number

    ZMQ_CONNECT_TIMEOUT

    Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

    context: Context

    Context that this socket belongs to.

    curvePublicKey: null | string

    ZMQ_CURVE_PUBLICKEY

    Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

    curveSecretKey: null | string

    ZMQ_CURVE_SECRETKEY

    Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

    curveServer: boolean

    ZMQ_CURVE_SERVER

    Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

    curveServerKey: null | string

    ZMQ_CURVE_SERVERKEY

    Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

    events: Observer

    Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

    gssapiPlainText: boolean
    gssapiPrincipal: null | string
    gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    gssapiServer: boolean
    gssapiServicePrincipal: null | string
    gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    handshakeInterval: number

    ZMQ_HANDSHAKE_IVL

    Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

    heartbeatInterval: number

    ZMQ_HEARTBEAT_IVL

    Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

    heartbeatTimeout: number

    ZMQ_HEARTBEAT_TIMEOUT

    How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

    heartbeatTimeToLive: number

    ZMQ_HEARTBEAT_TTL

    The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

    immediate: boolean

    ZMQ_IMMEDIATE

    By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

    interface: null | string

    ZMQ_BINDTODEVICE

    Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

    invertMatching: boolean

    ZMQ_INVERT_MATCHING

    Causes incoming messages that do not match any of the socket's subscriptions to be received by the user.

    All Subscriber sockets connecting to a Publisher must also have the option set to true. Failure to do so will have the Subscriber sockets reject everything the Publisher socket sends them.

    ipv6: boolean

    ZMQ_IPV6

    Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

    lastEndpoint: null | string

    ZMQ_LAST_ENDPOINT

    The last endpoint bound for TCP and IPC transports.

    linger: number

    ZMQ_LINGER

    Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

    loopbackFastPath: boolean

    ZMQ_LOOPBACK_FASTPATH

    Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

    maxMessageSize: number

    ZMQ_MAXMSGSIZE

    Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

    multicastMaxTransportDataUnit: number

    ZMQ_MULTICAST_MAXTPDU

    Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

    plainPassword: null | string

    ZMQ_PLAIN_PASSWORD

    Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    plainServer: boolean

    ZMQ_PLAIN_SERVER

    Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

    plainUsername: null | string

    ZMQ_PLAIN_USERNAME

    Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    rate: number

    ZMQ_RATE

    Maximum send or receive data rate for multicast transports such as pgm.

    readable: boolean

    Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

    receiveBufferSize: number

    ZMQ_RCVBUF

    Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

    receiveHighWaterMark: number

    ZMQ_RCVHWM

    The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    receiveTimeout: number

    ZMQ_RCVTIMEO

    Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

    reconnectInterval: number

    ZMQ_RECONNECT_IVL

    Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

    reconnectMaxInterval: number

    ZMQ_RECONNECT_IVL_MAX

    Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

    recoveryInterval: number

    ZMQ_RECOVERY_IVL

    Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

    securityMechanism: null | "plain" | "curve" | "gssapi"

    ZMQ_MECHANISM

    Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

    • null - No security mechanism is used.
    • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
    • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
    • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
    socksProxy: null | string

    ZMQ_SOCKS_PROXY

    The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

    tcpAcceptFilter: null | string

    ZMQ_TCP_ACCEPT_FILTER

    Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

    tcpKeepalive: number

    ZMQ_TCP_KEEPALIVE

    Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveCount: number

    ZMQ_TCP_KEEPALIVE_CNT

    Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveIdle: number

    ZMQ_TCP_KEEPALIVE_IDLE

    Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveInterval: number

    ZMQ_TCP_KEEPALIVE_INTVL

    Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

    tcpMaxRetransmitTimeout: number

    ZMQ_TCP_MAXRT

    Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

    threadSafe: boolean

    ZMQ_THREAD_SAFE

    Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

    type: SocketType

    ZMQ_TYPE

    Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

    typeOfService: number

    ZMQ_TOS

    Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

    vmciBufferMaxSize: number

    ZMQ_VMCI_BUFFER_MAX_SIZE

    Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferMinSize: number

    ZMQ_VMCI_BUFFER_MIN_SIZE

    Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferSize: number

    ZMQ_VMCI_BUFFER_SIZE

    The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciConnectTimeout: number

    ZMQ_VMCI_CONNECT_TIMEOUT

    Connection timeout for the socket. For vmci:// transports only.

    writable: boolean

    Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

    zapDomain: null | string

    ZMQ_ZAP_DOMAIN

    Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

    zapEnforceDomain: boolean

    ZMQ_ZAP_ENFORCE_DOMAIN

    The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Methods

    • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

      for await (const [msg] of socket) {
      // handle messages
      } +

      Returns AsyncIterator<Buffer[]>

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      await socket.bind("tcp://127.0.0.1:3456")
      await socket.bind("tcp://*:3456") // binds on all interfaces
      await socket.bind("tcp://127.0.0.1:*") // binds on random port +

      Parameters

      • address: string

        Address to bind this socket to.

      Returns Promise<void>

      Resolved when the socket was successfully bound.

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      socket.bindSync("tcp://127.0.0.1:3456")
      socket.bindSync("tcp://*:3456") // binds on all interfaces
      socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

      Parameters

      • address: string

        Address to bind this socket to.

      Returns void

      Resolved when the socket was successfully bound.

    • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

      After this method is called, it is no longer possible to call any other methods on this socket.

      Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

      Calling this method on a socket that is already closed is a no-op.

      Returns void

    • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

      socket.connect("tcp://127.0.0.1:3456")
      +

      Parameters

      • address: string

        The address to connect to.

      Returns void

    • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

      socket.disconnect("tcp://127.0.0.1:3456")
      +

      Parameters

      • address: string

        The previously connected address to disconnect from.

      Returns void

    • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

      const [msg] = await socket.receive()
      const [part1, part2] = await socket.receive() +

      Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

      A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

      Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

      socket.receive() // -> pending promise until read is possible
      socket.receive() // -> promise rejection with `EBUSY` error +

      Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

      Returns Promise<Buffer[]>

      Resolved with message parts that were successfully read.

    • Parameters

      • option: number
      • value: boolean

      Returns void

    • Parameters

      • option: number
      • value: null | string | Buffer

      Returns void

    • Establish a new message filter. Newly created Subsriber sockets will filtered out all incoming messages. Call this method to subscribe to messages beginning with the given prefix.

      Multiple filters may be attached to a single socket, in which case a message shall be accepted if it matches at least one filter. Subscribing without any filters shall subscribe to all incoming messages.

      const sub = new Subscriber()

      // Listen to all messages beginning with 'foo'.
      sub.subscribe("foo")

      // Listen to all incoming messages.
      sub.subscribe() +

      Parameters

      • ...prefixes: (string | Buffer)[]

        The prefixes of messages to subscribe to.

      Returns void

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns Promise<void>

      Resolved when the socket was successfully unbound.

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns void

      Resolved when the socket was successfully unbound.

    • Remove an existing message filter which was previously established with subscribe(). Stops receiving messages with the given prefix.

      Unsubscribing without any filters shall unsubscribe from the "subscribe all" filter that is added by calling subscribe() without arguments.

      const sub = new Subscriber()

      // Listen to all messages beginning with 'foo'.
      sub.subscribe("foo")
      // ...

      // Stop listening to messages beginning with 'foo'.
      sub.unsubscribe("foo") +

      Parameters

      • ...prefixes: (string | Buffer)[]

        The prefixes of messages to subscribe to.

      Returns void

    \ No newline at end of file diff --git a/classes/XPublisher.html b/classes/XPublisher.html index daaa1db4..0bb66917 100644 --- a/classes/XPublisher.html +++ b/classes/XPublisher.html @@ -1,8 +1,9 @@ -XPublisher | zeromq.js

    Class XPublisher

    Same as Publisher, except that you can receive subscriptions from the peers in form of incoming messages. Subscription message is a byte 1 (for subscriptions) or byte 0 (for unsubscriptions) followed by the subscription body. Messages without a sub/unsub prefix are also received, but have no effect on subscription status.

    Hierarchy (view full)

    Constructors

    • Parameters

      • Optionaloptions: {
            affinity?: number;
            backlog?: number;
            connectTimeout?: number;
            context?: Context;
            curvePublicKey?: null | string;
            curveSecretKey?: null | string;
            curveServer?: boolean;
            curveServerKey?: null | string;
            gssapiPlainText?: boolean;
            gssapiPrincipal?: null | string;
            gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            gssapiServer?: boolean;
            gssapiServicePrincipal?: null | string;
            gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            handshakeInterval?: number;
            heartbeatInterval?: number;
            heartbeatTimeout?: number;
            heartbeatTimeToLive?: number;
            immediate?: boolean;
            interface?: null | string;
            invertMatching?: boolean;
            ipv6?: boolean;
            linger?: number;
            loopbackFastPath?: boolean;
            manual?: boolean;
            maxMessageSize?: number;
            multicastHops?: number;
            multicastMaxTransportDataUnit?: number;
            noDrop?: boolean;
            plainPassword?: null | string;
            plainServer?: boolean;
            plainUsername?: null | string;
            rate?: number;
            receiveBufferSize?: number;
            receiveHighWaterMark?: number;
            receiveTimeout?: number;
            reconnectInterval?: number;
            reconnectMaxInterval?: number;
            recoveryInterval?: number;
            sendBufferSize?: number;
            sendHighWaterMark?: number;
            sendTimeout?: number;
            socksProxy?: null | string;
            tcpAcceptFilter?: null | string;
            tcpKeepalive?: number;
            tcpKeepaliveCount?: number;
            tcpKeepaliveIdle?: number;
            tcpKeepaliveInterval?: number;
            tcpMaxRetransmitTimeout?: number;
            typeOfService?: number;
            verbosity:
                | undefined
                | null
                | "allSubs"
                | "allSubsUnsubs";
            vmciBufferMaxSize?: number;
            vmciBufferMinSize?: number;
            vmciBufferSize?: number;
            vmciConnectTimeout?: number;
            welcomeMessage?: null | string;
            zapDomain?: null | string;
            zapEnforceDomain?: boolean;
        }
        • Optionalaffinity?: number

          ZMQ_AFFINITY

          I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

          Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

        • Optionalbacklog?: number

          ZMQ_BACKLOG

          Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

        • OptionalconnectTimeout?: number

          ZMQ_CONNECT_TIMEOUT

          Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

        • Optionalcontext?: Context
        • OptionalcurvePublicKey?: null | string

          ZMQ_CURVE_PUBLICKEY

          Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

        • OptionalcurveSecretKey?: null | string

          ZMQ_CURVE_SECRETKEY

          Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

        • OptionalcurveServer?: boolean

          ZMQ_CURVE_SERVER

          Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

        • OptionalcurveServerKey?: null | string

          ZMQ_CURVE_SERVERKEY

          Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

        • OptionalgssapiPlainText?: boolean
        • OptionalgssapiPrincipal?: null | string
        • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalgssapiServer?: boolean
        • OptionalgssapiServicePrincipal?: null | string
        • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalhandshakeInterval?: number

          ZMQ_HANDSHAKE_IVL

          Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

        • OptionalheartbeatInterval?: number

          ZMQ_HEARTBEAT_IVL

          Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

        • OptionalheartbeatTimeout?: number

          ZMQ_HEARTBEAT_TIMEOUT

          How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

        • OptionalheartbeatTimeToLive?: number

          ZMQ_HEARTBEAT_TTL

          The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

        • Optionalimmediate?: boolean

          ZMQ_IMMEDIATE

          By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

        • Optionalinterface?: null | string

          ZMQ_BINDTODEVICE

          Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

        • OptionalinvertMatching?: boolean

          ZMQ_INVERT_MATCHING

          Causes messages to be sent to all connected sockets except those subscribed to a prefix that matches the message.

        • Optionalipv6?: boolean

          ZMQ_IPV6

          Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

        • Optionallinger?: number

          ZMQ_LINGER

          Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

        • OptionalloopbackFastPath?: boolean

          ZMQ_LOOPBACK_FASTPATH

          Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

        • Optionalmanual?: boolean

          ZMQ_XPUB_MANUAL

          Sets the XPublisher socket subscription handling mode to manual/automatic. A value of true will change the subscription requests handling to manual.

        • OptionalmaxMessageSize?: number

          ZMQ_MAXMSGSIZE

          Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

        • OptionalmulticastHops?: number

          ZMQ_MULTICAST_HOPS

          Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

        • OptionalmulticastMaxTransportDataUnit?: number

          ZMQ_MULTICAST_MAXTPDU

          Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

        • OptionalnoDrop?: boolean

          ZMQ_XPUB_NODROP

          Sets the socket behaviour to return an error if the high water mark is reached and the message could not be send. The default is to drop the message silently when the peer high water mark is reached.

        • OptionalplainPassword?: null | string

          ZMQ_PLAIN_PASSWORD

          Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • OptionalplainServer?: boolean

          ZMQ_PLAIN_SERVER

          Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

        • OptionalplainUsername?: null | string

          ZMQ_PLAIN_USERNAME

          Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • Optionalrate?: number

          ZMQ_RATE

          Maximum send or receive data rate for multicast transports such as pgm.

        • OptionalreceiveBufferSize?: number

          ZMQ_RCVBUF

          Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalreceiveHighWaterMark?: number

          ZMQ_RCVHWM

          The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalreceiveTimeout?: number

          ZMQ_RCVTIMEO

          Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

        • OptionalreconnectInterval?: number

          ZMQ_RECONNECT_IVL

          Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

        • OptionalreconnectMaxInterval?: number

          ZMQ_RECONNECT_IVL_MAX

          Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

        • OptionalrecoveryInterval?: number

          ZMQ_RECOVERY_IVL

          Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

        • OptionalsendBufferSize?: number

          ZMQ_SNDBUF

          Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalsendHighWaterMark?: number

          ZMQ_SNDHWM

          The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalsendTimeout?: number

          ZMQ_SNDTIMEO

          Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

        • OptionalsocksProxy?: null | string

          ZMQ_SOCKS_PROXY

          The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

        • OptionaltcpAcceptFilter?: null | string

          ZMQ_TCP_ACCEPT_FILTER

          Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

        • OptionaltcpKeepalive?: number

          ZMQ_TCP_KEEPALIVE

          Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveCount?: number

          ZMQ_TCP_KEEPALIVE_CNT

          Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveIdle?: number

          ZMQ_TCP_KEEPALIVE_IDLE

          Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveInterval?: number

          ZMQ_TCP_KEEPALIVE_INTVL

          Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpMaxRetransmitTimeout?: number

          ZMQ_TCP_MAXRT

          Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

        • OptionaltypeOfService?: number

          ZMQ_TOS

          Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

        • verbosity:
              | undefined
              | null
              | "allSubs"
              | "allSubsUnsubs"
        • OptionalvmciBufferMaxSize?: number

          ZMQ_VMCI_BUFFER_MAX_SIZE

          Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferMinSize?: number

          ZMQ_VMCI_BUFFER_MIN_SIZE

          Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferSize?: number

          ZMQ_VMCI_BUFFER_SIZE

          The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciConnectTimeout?: number

          ZMQ_VMCI_CONNECT_TIMEOUT

          Connection timeout for the socket. For vmci:// transports only.

        • OptionalwelcomeMessage?: null | string

          ZMQ_XPUB_WELCOME_MSG

          Sets a welcome message that will be recieved by subscriber when connecting. Subscriber must subscribe to the welcome message before connecting. For welcome messages to work well, poll on incoming subscription messages on the XPublisher socket and handle them.

        • OptionalzapDomain?: null | string

          ZMQ_ZAP_DOMAIN

          Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

        • OptionalzapEnforceDomain?: boolean

          ZMQ_ZAP_ENFORCE_DOMAIN

          The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

      Returns XPublisher

    Properties

    affinity: number

    ZMQ_AFFINITY

    I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

    Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

    backlog: number

    ZMQ_BACKLOG

    Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

    closed: boolean

    Whether this socket was previously closed with close().

    connectTimeout: number

    ZMQ_CONNECT_TIMEOUT

    Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

    context: Context

    Context that this socket belongs to.

    curvePublicKey: null | string

    ZMQ_CURVE_PUBLICKEY

    Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

    curveSecretKey: null | string

    ZMQ_CURVE_SECRETKEY

    Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

    curveServer: boolean

    ZMQ_CURVE_SERVER

    Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

    curveServerKey: null | string

    ZMQ_CURVE_SERVERKEY

    Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

    events: Observer

    Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

    gssapiPlainText: boolean
    gssapiPrincipal: null | string
    gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    gssapiServer: boolean
    gssapiServicePrincipal: null | string
    gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    handshakeInterval: number

    ZMQ_HANDSHAKE_IVL

    Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

    heartbeatInterval: number

    ZMQ_HEARTBEAT_IVL

    Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

    heartbeatTimeout: number

    ZMQ_HEARTBEAT_TIMEOUT

    How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

    heartbeatTimeToLive: number

    ZMQ_HEARTBEAT_TTL

    The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

    immediate: boolean

    ZMQ_IMMEDIATE

    By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

    interface: null | string

    ZMQ_BINDTODEVICE

    Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

    invertMatching: boolean

    ZMQ_INVERT_MATCHING

    Causes messages to be sent to all connected sockets except those subscribed to a prefix that matches the message.

    ipv6: boolean

    ZMQ_IPV6

    Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

    lastEndpoint: null | string

    ZMQ_LAST_ENDPOINT

    The last endpoint bound for TCP and IPC transports.

    linger: number

    ZMQ_LINGER

    Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

    loopbackFastPath: boolean

    ZMQ_LOOPBACK_FASTPATH

    Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

    manual: boolean

    ZMQ_XPUB_MANUAL

    Sets the XPublisher socket subscription handling mode to manual/automatic. A value of true will change the subscription requests handling to manual.

    maxMessageSize: number

    ZMQ_MAXMSGSIZE

    Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

    multicastHops: number

    ZMQ_MULTICAST_HOPS

    Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

    multicastMaxTransportDataUnit: number

    ZMQ_MULTICAST_MAXTPDU

    Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

    noDrop: boolean

    ZMQ_XPUB_NODROP

    Sets the socket behaviour to return an error if the high water mark is reached and the message could not be send. The default is to drop the message silently when the peer high water mark is reached.

    plainPassword: null | string

    ZMQ_PLAIN_PASSWORD

    Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    plainServer: boolean

    ZMQ_PLAIN_SERVER

    Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

    plainUsername: null | string

    ZMQ_PLAIN_USERNAME

    Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    rate: number

    ZMQ_RATE

    Maximum send or receive data rate for multicast transports such as pgm.

    readable: boolean

    Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

    receiveBufferSize: number

    ZMQ_RCVBUF

    Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

    receiveHighWaterMark: number

    ZMQ_RCVHWM

    The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    receiveTimeout: number

    ZMQ_RCVTIMEO

    Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

    reconnectInterval: number

    ZMQ_RECONNECT_IVL

    Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

    reconnectMaxInterval: number

    ZMQ_RECONNECT_IVL_MAX

    Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

    recoveryInterval: number

    ZMQ_RECOVERY_IVL

    Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

    securityMechanism:
        | null
        | "plain"
        | "curve"
        | "gssapi"

    ZMQ_MECHANISM

    Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

    • null - No security mechanism is used.
    • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
    • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
    • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
    sendBufferSize: number

    ZMQ_SNDBUF

    Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

    sendHighWaterMark: number

    ZMQ_SNDHWM

    The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    sendTimeout: number

    ZMQ_SNDTIMEO

    Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

    socksProxy: null | string

    ZMQ_SOCKS_PROXY

    The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

    tcpAcceptFilter: null | string

    ZMQ_TCP_ACCEPT_FILTER

    Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

    tcpKeepalive: number

    ZMQ_TCP_KEEPALIVE

    Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveCount: number

    ZMQ_TCP_KEEPALIVE_CNT

    Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveIdle: number

    ZMQ_TCP_KEEPALIVE_IDLE

    Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveInterval: number

    ZMQ_TCP_KEEPALIVE_INTVL

    Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

    tcpMaxRetransmitTimeout: number

    ZMQ_TCP_MAXRT

    Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

    threadSafe: boolean

    ZMQ_THREAD_SAFE

    Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

    type: SocketType

    ZMQ_TYPE

    Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

    typeOfService: number

    ZMQ_TOS

    Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

    vmciBufferMaxSize: number

    ZMQ_VMCI_BUFFER_MAX_SIZE

    Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferMinSize: number

    ZMQ_VMCI_BUFFER_MIN_SIZE

    Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferSize: number

    ZMQ_VMCI_BUFFER_SIZE

    The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciConnectTimeout: number

    ZMQ_VMCI_CONNECT_TIMEOUT

    Connection timeout for the socket. For vmci:// transports only.

    welcomeMessage: null | string

    ZMQ_XPUB_WELCOME_MSG

    Sets a welcome message that will be recieved by subscriber when connecting. Subscriber must subscribe to the welcome message before connecting. For welcome messages to work well, poll on incoming subscription messages on the XPublisher socket and handle them.

    writable: boolean

    Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

    zapDomain: null | string

    ZMQ_ZAP_DOMAIN

    Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

    zapEnforceDomain: boolean

    ZMQ_ZAP_ENFORCE_DOMAIN

    The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Accessors

    • set verbosity(value): void
    • ZMQ_XPUB_VERBOSE / ZMQ_XPUB_VERBOSER

      Whether to pass any duplicate subscription/unsuscription messages.

      • null (default) - Only unique subscribe and unsubscribe messages are visible to the caller.
      • "allSubs" - All subscribe messages (including duplicates) are visible to the caller, but only unique unsubscribe messages are visible.
      • "allSubsUnsubs" - All subscribe and unsubscribe messages (including duplicates) are visible to the caller.

      Parameters

      • value: null | "allSubs" | "allSubsUnsubs"

      Returns void

    Methods

    • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

      for await (const [msg] of socket) {
      // handle messages
      } -

      Returns AsyncIterator<Buffer[], undefined, undefined>

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      await socket.bind("tcp://127.0.0.1:3456")
      await socket.bind("tcp://*:3456") // binds on all interfaces
      await socket.bind("tcp://127.0.0.1:*") // binds on random port -

      Parameters

      • address: string

        Address to bind this socket to.

      Returns Promise<void>

      Resolved when the socket was successfully bound.

    • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

      After this method is called, it is no longer possible to call any other methods on this socket.

      Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

      Calling this method on a socket that is already closed is a no-op.

      Returns void

    • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

      socket.connect("tcp://127.0.0.1:3456")
      -

      Parameters

      • address: string

        The address to connect to.

      Returns void

    • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

      socket.disconnect("tcp://127.0.0.1:3456")
      -

      Parameters

      • address: string

        The previously connected address to disconnect from.

      Returns void

    • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

      const [msg] = await socket.receive()
      const [part1, part2] = await socket.receive() -

      Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

      A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

      Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

      socket.receive() // -> pending promise until read is possible
      socket.receive() // -> promise rejection with `EBUSY` error -

      Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

      Returns Promise<Buffer[]>

      Resolved with message parts that were successfully read.

    • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

      await socket.send("hello world")
      await socket.send(["hello", "world"]) -

      Queueing may fail eventually if the socket has been configured with a sendTimeout.

      A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

      Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

      The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

      For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

      • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

        • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

        • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

      • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

      • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

      Parameters

      • message: MessageLike | MessageLike[]

        Single message or multipart message to queue for sending.

      • Rest...options: []

        Any options, if applicable to the socket type (DRAFT only).

      Returns Promise<void>

      Resolved when the message was successfully queued.

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns Promise<void>

      Resolved when the socket was successfully unbound.

    \ No newline at end of file +XPublisher | zeromq.js

    Class XPublisher

    Same as Publisher, except that you can receive subscriptions from the peers in form of incoming messages. Subscription message is a byte 1 (for subscriptions) or byte 0 (for unsubscriptions) followed by the subscription body. Messages without a sub/unsub prefix are also received, but have no effect on subscription status.

    Hierarchy (View Summary)

    Constructors

    • Parameters

      • Optionaloptions: {
            affinity?: number;
            backlog?: number;
            connectTimeout?: number;
            context?: Context;
            curvePublicKey?: null | string;
            curveSecretKey?: null | string;
            curveServer?: boolean;
            curveServerKey?: null | string;
            gssapiPlainText?: boolean;
            gssapiPrincipal?: null | string;
            gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            gssapiServer?: boolean;
            gssapiServicePrincipal?: null | string;
            gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            handshakeInterval?: number;
            heartbeatInterval?: number;
            heartbeatTimeout?: number;
            heartbeatTimeToLive?: number;
            immediate?: boolean;
            interface?: null | string;
            invertMatching?: boolean;
            ipv6?: boolean;
            linger?: number;
            loopbackFastPath?: boolean;
            manual?: boolean;
            maxMessageSize?: number;
            multicastHops?: number;
            multicastMaxTransportDataUnit?: number;
            noDrop?: boolean;
            plainPassword?: null | string;
            plainServer?: boolean;
            plainUsername?: null | string;
            rate?: number;
            receiveBufferSize?: number;
            receiveHighWaterMark?: number;
            receiveTimeout?: number;
            reconnectInterval?: number;
            reconnectMaxInterval?: number;
            recoveryInterval?: number;
            sendBufferSize?: number;
            sendHighWaterMark?: number;
            sendTimeout?: number;
            socksProxy?: null | string;
            tcpAcceptFilter?: null | string;
            tcpKeepalive?: number;
            tcpKeepaliveCount?: number;
            tcpKeepaliveIdle?: number;
            tcpKeepaliveInterval?: number;
            tcpMaxRetransmitTimeout?: number;
            typeOfService?: number;
            verbosity?: null | "allSubs" | "allSubsUnsubs";
            vmciBufferMaxSize?: number;
            vmciBufferMinSize?: number;
            vmciBufferSize?: number;
            vmciConnectTimeout?: number;
            welcomeMessage?: null | string;
            zapDomain?: null | string;
            zapEnforceDomain?: boolean;
        }
        • Optionalaffinity?: number

          ZMQ_AFFINITY

          I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

          Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

        • Optionalbacklog?: number

          ZMQ_BACKLOG

          Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

        • OptionalconnectTimeout?: number

          ZMQ_CONNECT_TIMEOUT

          Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

        • Optionalcontext?: Context
        • OptionalcurvePublicKey?: null | string

          ZMQ_CURVE_PUBLICKEY

          Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

        • OptionalcurveSecretKey?: null | string

          ZMQ_CURVE_SECRETKEY

          Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

        • OptionalcurveServer?: boolean

          ZMQ_CURVE_SERVER

          Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

        • OptionalcurveServerKey?: null | string

          ZMQ_CURVE_SERVERKEY

          Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

        • OptionalgssapiPlainText?: boolean
        • OptionalgssapiPrincipal?: null | string
        • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalgssapiServer?: boolean
        • OptionalgssapiServicePrincipal?: null | string
        • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalhandshakeInterval?: number

          ZMQ_HANDSHAKE_IVL

          Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

        • OptionalheartbeatInterval?: number

          ZMQ_HEARTBEAT_IVL

          Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

        • OptionalheartbeatTimeout?: number

          ZMQ_HEARTBEAT_TIMEOUT

          How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

        • OptionalheartbeatTimeToLive?: number

          ZMQ_HEARTBEAT_TTL

          The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

        • Optionalimmediate?: boolean

          ZMQ_IMMEDIATE

          By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

        • Optionalinterface?: null | string

          ZMQ_BINDTODEVICE

          Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

        • OptionalinvertMatching?: boolean

          ZMQ_INVERT_MATCHING

          Causes messages to be sent to all connected sockets except those subscribed to a prefix that matches the message.

        • Optionalipv6?: boolean

          ZMQ_IPV6

          Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

        • Optionallinger?: number

          ZMQ_LINGER

          Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

        • OptionalloopbackFastPath?: boolean

          ZMQ_LOOPBACK_FASTPATH

          Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

        • Optionalmanual?: boolean

          ZMQ_XPUB_MANUAL

          Sets the XPublisher socket subscription handling mode to manual/automatic. A value of true will change the subscription requests handling to manual.

        • OptionalmaxMessageSize?: number

          ZMQ_MAXMSGSIZE

          Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

        • OptionalmulticastHops?: number

          ZMQ_MULTICAST_HOPS

          Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

        • OptionalmulticastMaxTransportDataUnit?: number

          ZMQ_MULTICAST_MAXTPDU

          Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

        • OptionalnoDrop?: boolean

          ZMQ_XPUB_NODROP

          Sets the socket behaviour to return an error if the high water mark is reached and the message could not be send. The default is to drop the message silently when the peer high water mark is reached.

        • OptionalplainPassword?: null | string

          ZMQ_PLAIN_PASSWORD

          Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • OptionalplainServer?: boolean

          ZMQ_PLAIN_SERVER

          Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

        • OptionalplainUsername?: null | string

          ZMQ_PLAIN_USERNAME

          Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • Optionalrate?: number

          ZMQ_RATE

          Maximum send or receive data rate for multicast transports such as pgm.

        • OptionalreceiveBufferSize?: number

          ZMQ_RCVBUF

          Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalreceiveHighWaterMark?: number

          ZMQ_RCVHWM

          The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalreceiveTimeout?: number

          ZMQ_RCVTIMEO

          Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

        • OptionalreconnectInterval?: number

          ZMQ_RECONNECT_IVL

          Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

        • OptionalreconnectMaxInterval?: number

          ZMQ_RECONNECT_IVL_MAX

          Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

        • OptionalrecoveryInterval?: number

          ZMQ_RECOVERY_IVL

          Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

        • OptionalsendBufferSize?: number

          ZMQ_SNDBUF

          Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalsendHighWaterMark?: number

          ZMQ_SNDHWM

          The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalsendTimeout?: number

          ZMQ_SNDTIMEO

          Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

        • OptionalsocksProxy?: null | string

          ZMQ_SOCKS_PROXY

          The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

        • OptionaltcpAcceptFilter?: null | string

          ZMQ_TCP_ACCEPT_FILTER

          Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

        • OptionaltcpKeepalive?: number

          ZMQ_TCP_KEEPALIVE

          Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveCount?: number

          ZMQ_TCP_KEEPALIVE_CNT

          Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveIdle?: number

          ZMQ_TCP_KEEPALIVE_IDLE

          Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveInterval?: number

          ZMQ_TCP_KEEPALIVE_INTVL

          Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpMaxRetransmitTimeout?: number

          ZMQ_TCP_MAXRT

          Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

        • OptionaltypeOfService?: number

          ZMQ_TOS

          Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

        • Optionalverbosity?: null | "allSubs" | "allSubsUnsubs"
        • OptionalvmciBufferMaxSize?: number

          ZMQ_VMCI_BUFFER_MAX_SIZE

          Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferMinSize?: number

          ZMQ_VMCI_BUFFER_MIN_SIZE

          Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferSize?: number

          ZMQ_VMCI_BUFFER_SIZE

          The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciConnectTimeout?: number

          ZMQ_VMCI_CONNECT_TIMEOUT

          Connection timeout for the socket. For vmci:// transports only.

        • OptionalwelcomeMessage?: null | string

          ZMQ_XPUB_WELCOME_MSG

          Sets a welcome message that will be recieved by subscriber when connecting. Subscriber must subscribe to the welcome message before connecting. For welcome messages to work well, poll on incoming subscription messages on the XPublisher socket and handle them.

        • OptionalzapDomain?: null | string

          ZMQ_ZAP_DOMAIN

          Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

        • OptionalzapEnforceDomain?: boolean

          ZMQ_ZAP_ENFORCE_DOMAIN

          The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

      Returns XPublisher

    Properties

    affinity: number

    ZMQ_AFFINITY

    I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

    Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

    backlog: number

    ZMQ_BACKLOG

    Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

    closed: boolean

    Whether this socket was previously closed with close().

    connectTimeout: number

    ZMQ_CONNECT_TIMEOUT

    Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

    context: Context

    Context that this socket belongs to.

    curvePublicKey: null | string

    ZMQ_CURVE_PUBLICKEY

    Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

    curveSecretKey: null | string

    ZMQ_CURVE_SECRETKEY

    Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

    curveServer: boolean

    ZMQ_CURVE_SERVER

    Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

    curveServerKey: null | string

    ZMQ_CURVE_SERVERKEY

    Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

    events: Observer

    Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

    gssapiPlainText: boolean
    gssapiPrincipal: null | string
    gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    gssapiServer: boolean
    gssapiServicePrincipal: null | string
    gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    handshakeInterval: number

    ZMQ_HANDSHAKE_IVL

    Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

    heartbeatInterval: number

    ZMQ_HEARTBEAT_IVL

    Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

    heartbeatTimeout: number

    ZMQ_HEARTBEAT_TIMEOUT

    How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

    heartbeatTimeToLive: number

    ZMQ_HEARTBEAT_TTL

    The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

    immediate: boolean

    ZMQ_IMMEDIATE

    By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

    interface: null | string

    ZMQ_BINDTODEVICE

    Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

    invertMatching: boolean

    ZMQ_INVERT_MATCHING

    Causes messages to be sent to all connected sockets except those subscribed to a prefix that matches the message.

    ipv6: boolean

    ZMQ_IPV6

    Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

    lastEndpoint: null | string

    ZMQ_LAST_ENDPOINT

    The last endpoint bound for TCP and IPC transports.

    linger: number

    ZMQ_LINGER

    Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

    loopbackFastPath: boolean

    ZMQ_LOOPBACK_FASTPATH

    Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

    manual: boolean

    ZMQ_XPUB_MANUAL

    Sets the XPublisher socket subscription handling mode to manual/automatic. A value of true will change the subscription requests handling to manual.

    maxMessageSize: number

    ZMQ_MAXMSGSIZE

    Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

    multicastHops: number

    ZMQ_MULTICAST_HOPS

    Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

    multicastMaxTransportDataUnit: number

    ZMQ_MULTICAST_MAXTPDU

    Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

    noDrop: boolean

    ZMQ_XPUB_NODROP

    Sets the socket behaviour to return an error if the high water mark is reached and the message could not be send. The default is to drop the message silently when the peer high water mark is reached.

    plainPassword: null | string

    ZMQ_PLAIN_PASSWORD

    Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    plainServer: boolean

    ZMQ_PLAIN_SERVER

    Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

    plainUsername: null | string

    ZMQ_PLAIN_USERNAME

    Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    rate: number

    ZMQ_RATE

    Maximum send or receive data rate for multicast transports such as pgm.

    readable: boolean

    Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

    receiveBufferSize: number

    ZMQ_RCVBUF

    Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

    receiveHighWaterMark: number

    ZMQ_RCVHWM

    The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    receiveTimeout: number

    ZMQ_RCVTIMEO

    Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

    reconnectInterval: number

    ZMQ_RECONNECT_IVL

    Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

    reconnectMaxInterval: number

    ZMQ_RECONNECT_IVL_MAX

    Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

    recoveryInterval: number

    ZMQ_RECOVERY_IVL

    Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

    securityMechanism: null | "plain" | "curve" | "gssapi"

    ZMQ_MECHANISM

    Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

    • null - No security mechanism is used.
    • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
    • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
    • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
    sendBufferSize: number

    ZMQ_SNDBUF

    Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

    sendHighWaterMark: number

    ZMQ_SNDHWM

    The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    sendTimeout: number

    ZMQ_SNDTIMEO

    Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

    socksProxy: null | string

    ZMQ_SOCKS_PROXY

    The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

    tcpAcceptFilter: null | string

    ZMQ_TCP_ACCEPT_FILTER

    Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

    tcpKeepalive: number

    ZMQ_TCP_KEEPALIVE

    Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveCount: number

    ZMQ_TCP_KEEPALIVE_CNT

    Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveIdle: number

    ZMQ_TCP_KEEPALIVE_IDLE

    Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveInterval: number

    ZMQ_TCP_KEEPALIVE_INTVL

    Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

    tcpMaxRetransmitTimeout: number

    ZMQ_TCP_MAXRT

    Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

    threadSafe: boolean

    ZMQ_THREAD_SAFE

    Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

    type: SocketType

    ZMQ_TYPE

    Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

    typeOfService: number

    ZMQ_TOS

    Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

    vmciBufferMaxSize: number

    ZMQ_VMCI_BUFFER_MAX_SIZE

    Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferMinSize: number

    ZMQ_VMCI_BUFFER_MIN_SIZE

    Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferSize: number

    ZMQ_VMCI_BUFFER_SIZE

    The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciConnectTimeout: number

    ZMQ_VMCI_CONNECT_TIMEOUT

    Connection timeout for the socket. For vmci:// transports only.

    welcomeMessage: null | string

    ZMQ_XPUB_WELCOME_MSG

    Sets a welcome message that will be recieved by subscriber when connecting. Subscriber must subscribe to the welcome message before connecting. For welcome messages to work well, poll on incoming subscription messages on the XPublisher socket and handle them.

    writable: boolean

    Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

    zapDomain: null | string

    ZMQ_ZAP_DOMAIN

    Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

    zapEnforceDomain: boolean

    ZMQ_ZAP_ENFORCE_DOMAIN

    The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Accessors

    • set verbosity(value: null | "allSubs" | "allSubsUnsubs"): void
    • ZMQ_XPUB_VERBOSE / ZMQ_XPUB_VERBOSER

      Whether to pass any duplicate subscription/unsuscription messages.

      • null (default) - Only unique subscribe and unsubscribe messages are visible to the caller.
      • "allSubs" - All subscribe messages (including duplicates) are visible to the caller, but only unique unsubscribe messages are visible.
      • "allSubsUnsubs" - All subscribe and unsubscribe messages (including duplicates) are visible to the caller.

      Parameters

      • value: null | "allSubs" | "allSubsUnsubs"

      Returns void

    Methods

    • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

      for await (const [msg] of socket) {
      // handle messages
      } +

      Returns AsyncIterator<Buffer[]>

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      await socket.bind("tcp://127.0.0.1:3456")
      await socket.bind("tcp://*:3456") // binds on all interfaces
      await socket.bind("tcp://127.0.0.1:*") // binds on random port +

      Parameters

      • address: string

        Address to bind this socket to.

      Returns Promise<void>

      Resolved when the socket was successfully bound.

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      socket.bindSync("tcp://127.0.0.1:3456")
      socket.bindSync("tcp://*:3456") // binds on all interfaces
      socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

      Parameters

      • address: string

        Address to bind this socket to.

      Returns void

      Resolved when the socket was successfully bound.

    • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

      After this method is called, it is no longer possible to call any other methods on this socket.

      Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

      Calling this method on a socket that is already closed is a no-op.

      Returns void

    • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

      socket.connect("tcp://127.0.0.1:3456")
      +

      Parameters

      • address: string

        The address to connect to.

      Returns void

    • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

      socket.disconnect("tcp://127.0.0.1:3456")
      +

      Parameters

      • address: string

        The previously connected address to disconnect from.

      Returns void

    • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

      const [msg] = await socket.receive()
      const [part1, part2] = await socket.receive() +

      Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

      A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

      Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

      socket.receive() // -> pending promise until read is possible
      socket.receive() // -> promise rejection with `EBUSY` error +

      Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

      Returns Promise<Buffer[]>

      Resolved with message parts that were successfully read.

    • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

      await socket.send("hello world")
      await socket.send(["hello", "world"]) +

      Queueing may fail eventually if the socket has been configured with a sendTimeout.

      A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

      Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

      The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

      For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

      • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

        • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

        • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

      • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

      • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

      Parameters

      • message: MessageLike | MessageLike[]

        Single message or multipart message to queue for sending.

      • ...options: []

        Any options, if applicable to the socket type (DRAFT only).

      Returns Promise<void>

      Resolved when the message was successfully queued.

    • Parameters

      • option: number
      • value: boolean

      Returns void

    • Parameters

      • option: number
      • value: null | string | Buffer

      Returns void

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns Promise<void>

      Resolved when the socket was successfully unbound.

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns void

      Resolved when the socket was successfully unbound.

    \ No newline at end of file diff --git a/classes/XSubscriber.html b/classes/XSubscriber.html index f1d29a79..32afabd3 100644 --- a/classes/XSubscriber.html +++ b/classes/XSubscriber.html @@ -1,8 +1,9 @@ -XSubscriber | zeromq.js

    Class XSubscriber

    Same as Subscriber, except that you subscribe by sending subscription messages to the socket. Subscription message is a byte 1 (for subscriptions) or byte 0 (for unsubscriptions) followed by the subscription body. Messages without a sub/unsub prefix may also be sent, but have no effect on subscription status.

    Hierarchy (view full)

    Constructors

    • Parameters

      • Optionaloptions: {
            affinity?: number;
            backlog?: number;
            connectTimeout?: number;
            context?: Context;
            curvePublicKey?: null | string;
            curveSecretKey?: null | string;
            curveServer?: boolean;
            curveServerKey?: null | string;
            gssapiPlainText?: boolean;
            gssapiPrincipal?: null | string;
            gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            gssapiServer?: boolean;
            gssapiServicePrincipal?: null | string;
            gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            handshakeInterval?: number;
            heartbeatInterval?: number;
            heartbeatTimeout?: number;
            heartbeatTimeToLive?: number;
            immediate?: boolean;
            interface?: null | string;
            ipv6?: boolean;
            linger?: number;
            loopbackFastPath?: boolean;
            maxMessageSize?: number;
            multicastHops?: number;
            multicastMaxTransportDataUnit?: number;
            plainPassword?: null | string;
            plainServer?: boolean;
            plainUsername?: null | string;
            rate?: number;
            receiveBufferSize?: number;
            receiveHighWaterMark?: number;
            receiveTimeout?: number;
            reconnectInterval?: number;
            reconnectMaxInterval?: number;
            recoveryInterval?: number;
            sendBufferSize?: number;
            sendHighWaterMark?: number;
            sendTimeout?: number;
            socksProxy?: null | string;
            tcpAcceptFilter?: null | string;
            tcpKeepalive?: number;
            tcpKeepaliveCount?: number;
            tcpKeepaliveIdle?: number;
            tcpKeepaliveInterval?: number;
            tcpMaxRetransmitTimeout?: number;
            typeOfService?: number;
            vmciBufferMaxSize?: number;
            vmciBufferMinSize?: number;
            vmciBufferSize?: number;
            vmciConnectTimeout?: number;
            zapDomain?: null | string;
            zapEnforceDomain?: boolean;
        }
        • Optionalaffinity?: number

          ZMQ_AFFINITY

          I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

          Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

        • Optionalbacklog?: number

          ZMQ_BACKLOG

          Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

        • OptionalconnectTimeout?: number

          ZMQ_CONNECT_TIMEOUT

          Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

        • Optionalcontext?: Context
        • OptionalcurvePublicKey?: null | string

          ZMQ_CURVE_PUBLICKEY

          Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

        • OptionalcurveSecretKey?: null | string

          ZMQ_CURVE_SECRETKEY

          Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

        • OptionalcurveServer?: boolean

          ZMQ_CURVE_SERVER

          Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

        • OptionalcurveServerKey?: null | string

          ZMQ_CURVE_SERVERKEY

          Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

        • OptionalgssapiPlainText?: boolean
        • OptionalgssapiPrincipal?: null | string
        • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalgssapiServer?: boolean
        • OptionalgssapiServicePrincipal?: null | string
        • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalhandshakeInterval?: number

          ZMQ_HANDSHAKE_IVL

          Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

        • OptionalheartbeatInterval?: number

          ZMQ_HEARTBEAT_IVL

          Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

        • OptionalheartbeatTimeout?: number

          ZMQ_HEARTBEAT_TIMEOUT

          How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

        • OptionalheartbeatTimeToLive?: number

          ZMQ_HEARTBEAT_TTL

          The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

        • Optionalimmediate?: boolean

          ZMQ_IMMEDIATE

          By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

        • Optionalinterface?: null | string

          ZMQ_BINDTODEVICE

          Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

        • Optionalipv6?: boolean

          ZMQ_IPV6

          Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

        • Optionallinger?: number

          ZMQ_LINGER

          Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

        • OptionalloopbackFastPath?: boolean

          ZMQ_LOOPBACK_FASTPATH

          Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

        • OptionalmaxMessageSize?: number

          ZMQ_MAXMSGSIZE

          Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

        • OptionalmulticastHops?: number

          ZMQ_MULTICAST_HOPS

          Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

        • OptionalmulticastMaxTransportDataUnit?: number

          ZMQ_MULTICAST_MAXTPDU

          Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

        • OptionalplainPassword?: null | string

          ZMQ_PLAIN_PASSWORD

          Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • OptionalplainServer?: boolean

          ZMQ_PLAIN_SERVER

          Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

        • OptionalplainUsername?: null | string

          ZMQ_PLAIN_USERNAME

          Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • Optionalrate?: number

          ZMQ_RATE

          Maximum send or receive data rate for multicast transports such as pgm.

        • OptionalreceiveBufferSize?: number

          ZMQ_RCVBUF

          Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalreceiveHighWaterMark?: number

          ZMQ_RCVHWM

          The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalreceiveTimeout?: number

          ZMQ_RCVTIMEO

          Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

        • OptionalreconnectInterval?: number

          ZMQ_RECONNECT_IVL

          Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

        • OptionalreconnectMaxInterval?: number

          ZMQ_RECONNECT_IVL_MAX

          Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

        • OptionalrecoveryInterval?: number

          ZMQ_RECOVERY_IVL

          Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

        • OptionalsendBufferSize?: number

          ZMQ_SNDBUF

          Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalsendHighWaterMark?: number

          ZMQ_SNDHWM

          The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalsendTimeout?: number

          ZMQ_SNDTIMEO

          Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

        • OptionalsocksProxy?: null | string

          ZMQ_SOCKS_PROXY

          The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

        • OptionaltcpAcceptFilter?: null | string

          ZMQ_TCP_ACCEPT_FILTER

          Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

        • OptionaltcpKeepalive?: number

          ZMQ_TCP_KEEPALIVE

          Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveCount?: number

          ZMQ_TCP_KEEPALIVE_CNT

          Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveIdle?: number

          ZMQ_TCP_KEEPALIVE_IDLE

          Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveInterval?: number

          ZMQ_TCP_KEEPALIVE_INTVL

          Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpMaxRetransmitTimeout?: number

          ZMQ_TCP_MAXRT

          Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

        • OptionaltypeOfService?: number

          ZMQ_TOS

          Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

        • OptionalvmciBufferMaxSize?: number

          ZMQ_VMCI_BUFFER_MAX_SIZE

          Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferMinSize?: number

          ZMQ_VMCI_BUFFER_MIN_SIZE

          Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferSize?: number

          ZMQ_VMCI_BUFFER_SIZE

          The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciConnectTimeout?: number

          ZMQ_VMCI_CONNECT_TIMEOUT

          Connection timeout for the socket. For vmci:// transports only.

        • OptionalzapDomain?: null | string

          ZMQ_ZAP_DOMAIN

          Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

        • OptionalzapEnforceDomain?: boolean

          ZMQ_ZAP_ENFORCE_DOMAIN

          The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

      Returns XSubscriber

    Properties

    affinity: number

    ZMQ_AFFINITY

    I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

    Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

    backlog: number

    ZMQ_BACKLOG

    Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

    closed: boolean

    Whether this socket was previously closed with close().

    connectTimeout: number

    ZMQ_CONNECT_TIMEOUT

    Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

    context: Context

    Context that this socket belongs to.

    curvePublicKey: null | string

    ZMQ_CURVE_PUBLICKEY

    Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

    curveSecretKey: null | string

    ZMQ_CURVE_SECRETKEY

    Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

    curveServer: boolean

    ZMQ_CURVE_SERVER

    Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

    curveServerKey: null | string

    ZMQ_CURVE_SERVERKEY

    Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

    events: Observer

    Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

    gssapiPlainText: boolean
    gssapiPrincipal: null | string
    gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    gssapiServer: boolean
    gssapiServicePrincipal: null | string
    gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    handshakeInterval: number

    ZMQ_HANDSHAKE_IVL

    Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

    heartbeatInterval: number

    ZMQ_HEARTBEAT_IVL

    Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

    heartbeatTimeout: number

    ZMQ_HEARTBEAT_TIMEOUT

    How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

    heartbeatTimeToLive: number

    ZMQ_HEARTBEAT_TTL

    The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

    immediate: boolean

    ZMQ_IMMEDIATE

    By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

    interface: null | string

    ZMQ_BINDTODEVICE

    Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

    ipv6: boolean

    ZMQ_IPV6

    Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

    lastEndpoint: null | string

    ZMQ_LAST_ENDPOINT

    The last endpoint bound for TCP and IPC transports.

    linger: number

    ZMQ_LINGER

    Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

    loopbackFastPath: boolean

    ZMQ_LOOPBACK_FASTPATH

    Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

    maxMessageSize: number

    ZMQ_MAXMSGSIZE

    Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

    multicastHops: number

    ZMQ_MULTICAST_HOPS

    Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

    multicastMaxTransportDataUnit: number

    ZMQ_MULTICAST_MAXTPDU

    Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

    plainPassword: null | string

    ZMQ_PLAIN_PASSWORD

    Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    plainServer: boolean

    ZMQ_PLAIN_SERVER

    Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

    plainUsername: null | string

    ZMQ_PLAIN_USERNAME

    Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    rate: number

    ZMQ_RATE

    Maximum send or receive data rate for multicast transports such as pgm.

    readable: boolean

    Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

    receiveBufferSize: number

    ZMQ_RCVBUF

    Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

    receiveHighWaterMark: number

    ZMQ_RCVHWM

    The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    receiveTimeout: number

    ZMQ_RCVTIMEO

    Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

    reconnectInterval: number

    ZMQ_RECONNECT_IVL

    Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

    reconnectMaxInterval: number

    ZMQ_RECONNECT_IVL_MAX

    Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

    recoveryInterval: number

    ZMQ_RECOVERY_IVL

    Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

    securityMechanism:
        | null
        | "plain"
        | "curve"
        | "gssapi"

    ZMQ_MECHANISM

    Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

    • null - No security mechanism is used.
    • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
    • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
    • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
    sendBufferSize: number

    ZMQ_SNDBUF

    Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

    sendHighWaterMark: number

    ZMQ_SNDHWM

    The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    sendTimeout: number

    ZMQ_SNDTIMEO

    Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

    socksProxy: null | string

    ZMQ_SOCKS_PROXY

    The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

    tcpAcceptFilter: null | string

    ZMQ_TCP_ACCEPT_FILTER

    Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

    tcpKeepalive: number

    ZMQ_TCP_KEEPALIVE

    Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveCount: number

    ZMQ_TCP_KEEPALIVE_CNT

    Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveIdle: number

    ZMQ_TCP_KEEPALIVE_IDLE

    Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveInterval: number

    ZMQ_TCP_KEEPALIVE_INTVL

    Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

    tcpMaxRetransmitTimeout: number

    ZMQ_TCP_MAXRT

    Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

    threadSafe: boolean

    ZMQ_THREAD_SAFE

    Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

    type: SocketType

    ZMQ_TYPE

    Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

    typeOfService: number

    ZMQ_TOS

    Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

    vmciBufferMaxSize: number

    ZMQ_VMCI_BUFFER_MAX_SIZE

    Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferMinSize: number

    ZMQ_VMCI_BUFFER_MIN_SIZE

    Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferSize: number

    ZMQ_VMCI_BUFFER_SIZE

    The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciConnectTimeout: number

    ZMQ_VMCI_CONNECT_TIMEOUT

    Connection timeout for the socket. For vmci:// transports only.

    writable: boolean

    Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

    zapDomain: null | string

    ZMQ_ZAP_DOMAIN

    Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

    zapEnforceDomain: boolean

    ZMQ_ZAP_ENFORCE_DOMAIN

    The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Methods

    • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

      for await (const [msg] of socket) {
      // handle messages
      } -

      Returns AsyncIterator<Buffer[], undefined, undefined>

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      await socket.bind("tcp://127.0.0.1:3456")
      await socket.bind("tcp://*:3456") // binds on all interfaces
      await socket.bind("tcp://127.0.0.1:*") // binds on random port -

      Parameters

      • address: string

        Address to bind this socket to.

      Returns Promise<void>

      Resolved when the socket was successfully bound.

    • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

      After this method is called, it is no longer possible to call any other methods on this socket.

      Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

      Calling this method on a socket that is already closed is a no-op.

      Returns void

    • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

      socket.connect("tcp://127.0.0.1:3456")
      -

      Parameters

      • address: string

        The address to connect to.

      Returns void

    • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

      socket.disconnect("tcp://127.0.0.1:3456")
      -

      Parameters

      • address: string

        The previously connected address to disconnect from.

      Returns void

    • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

      const [msg] = await socket.receive()
      const [part1, part2] = await socket.receive() -

      Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

      A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

      Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

      socket.receive() // -> pending promise until read is possible
      socket.receive() // -> promise rejection with `EBUSY` error -

      Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

      Returns Promise<Buffer[]>

      Resolved with message parts that were successfully read.

    • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

      await socket.send("hello world")
      await socket.send(["hello", "world"]) -

      Queueing may fail eventually if the socket has been configured with a sendTimeout.

      A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

      Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

      The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

      For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

      • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

        • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

        • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

      • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

      • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

      Parameters

      • message: MessageLike | MessageLike[]

        Single message or multipart message to queue for sending.

      • Rest...options: []

        Any options, if applicable to the socket type (DRAFT only).

      Returns Promise<void>

      Resolved when the message was successfully queued.

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns Promise<void>

      Resolved when the socket was successfully unbound.

    \ No newline at end of file +XSubscriber | zeromq.js

    Class XSubscriber

    Same as Subscriber, except that you subscribe by sending subscription messages to the socket. Subscription message is a byte 1 (for subscriptions) or byte 0 (for unsubscriptions) followed by the subscription body. Messages without a sub/unsub prefix may also be sent, but have no effect on subscription status.

    Hierarchy (View Summary)

    Constructors

    • Parameters

      • Optionaloptions: {
            affinity?: number;
            backlog?: number;
            connectTimeout?: number;
            context?: Context;
            curvePublicKey?: null | string;
            curveSecretKey?: null | string;
            curveServer?: boolean;
            curveServerKey?: null | string;
            gssapiPlainText?: boolean;
            gssapiPrincipal?: null | string;
            gssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            gssapiServer?: boolean;
            gssapiServicePrincipal?: null | string;
            gssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal";
            handshakeInterval?: number;
            heartbeatInterval?: number;
            heartbeatTimeout?: number;
            heartbeatTimeToLive?: number;
            immediate?: boolean;
            interface?: null | string;
            ipv6?: boolean;
            linger?: number;
            loopbackFastPath?: boolean;
            maxMessageSize?: number;
            multicastHops?: number;
            multicastMaxTransportDataUnit?: number;
            plainPassword?: null | string;
            plainServer?: boolean;
            plainUsername?: null | string;
            rate?: number;
            receiveBufferSize?: number;
            receiveHighWaterMark?: number;
            receiveTimeout?: number;
            reconnectInterval?: number;
            reconnectMaxInterval?: number;
            recoveryInterval?: number;
            sendBufferSize?: number;
            sendHighWaterMark?: number;
            sendTimeout?: number;
            socksProxy?: null | string;
            tcpAcceptFilter?: null | string;
            tcpKeepalive?: number;
            tcpKeepaliveCount?: number;
            tcpKeepaliveIdle?: number;
            tcpKeepaliveInterval?: number;
            tcpMaxRetransmitTimeout?: number;
            typeOfService?: number;
            vmciBufferMaxSize?: number;
            vmciBufferMinSize?: number;
            vmciBufferSize?: number;
            vmciConnectTimeout?: number;
            zapDomain?: null | string;
            zapEnforceDomain?: boolean;
        }
        • Optionalaffinity?: number

          ZMQ_AFFINITY

          I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

          Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

        • Optionalbacklog?: number

          ZMQ_BACKLOG

          Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

        • OptionalconnectTimeout?: number

          ZMQ_CONNECT_TIMEOUT

          Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

        • Optionalcontext?: Context
        • OptionalcurvePublicKey?: null | string

          ZMQ_CURVE_PUBLICKEY

          Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

        • OptionalcurveSecretKey?: null | string

          ZMQ_CURVE_SECRETKEY

          Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

        • OptionalcurveServer?: boolean

          ZMQ_CURVE_SERVER

          Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

        • OptionalcurveServerKey?: null | string

          ZMQ_CURVE_SERVERKEY

          Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

        • OptionalgssapiPlainText?: boolean
        • OptionalgssapiPrincipal?: null | string
        • OptionalgssapiPrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalgssapiServer?: boolean
        • OptionalgssapiServicePrincipal?: null | string
        • OptionalgssapiServicePrincipalNameType?: "hostBased" | "userName" | "krb5Principal"
        • OptionalhandshakeInterval?: number

          ZMQ_HANDSHAKE_IVL

          Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

        • OptionalheartbeatInterval?: number

          ZMQ_HEARTBEAT_IVL

          Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

        • OptionalheartbeatTimeout?: number

          ZMQ_HEARTBEAT_TIMEOUT

          How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

        • OptionalheartbeatTimeToLive?: number

          ZMQ_HEARTBEAT_TTL

          The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

        • Optionalimmediate?: boolean

          ZMQ_IMMEDIATE

          By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

        • Optionalinterface?: null | string

          ZMQ_BINDTODEVICE

          Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

        • Optionalipv6?: boolean

          ZMQ_IPV6

          Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

        • Optionallinger?: number

          ZMQ_LINGER

          Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

        • OptionalloopbackFastPath?: boolean

          ZMQ_LOOPBACK_FASTPATH

          Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

        • OptionalmaxMessageSize?: number

          ZMQ_MAXMSGSIZE

          Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

        • OptionalmulticastHops?: number

          ZMQ_MULTICAST_HOPS

          Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

        • OptionalmulticastMaxTransportDataUnit?: number

          ZMQ_MULTICAST_MAXTPDU

          Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

        • OptionalplainPassword?: null | string

          ZMQ_PLAIN_PASSWORD

          Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • OptionalplainServer?: boolean

          ZMQ_PLAIN_SERVER

          Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

        • OptionalplainUsername?: null | string

          ZMQ_PLAIN_USERNAME

          Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

        • Optionalrate?: number

          ZMQ_RATE

          Maximum send or receive data rate for multicast transports such as pgm.

        • OptionalreceiveBufferSize?: number

          ZMQ_RCVBUF

          Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalreceiveHighWaterMark?: number

          ZMQ_RCVHWM

          The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalreceiveTimeout?: number

          ZMQ_RCVTIMEO

          Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

        • OptionalreconnectInterval?: number

          ZMQ_RECONNECT_IVL

          Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

        • OptionalreconnectMaxInterval?: number

          ZMQ_RECONNECT_IVL_MAX

          Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

        • OptionalrecoveryInterval?: number

          ZMQ_RECOVERY_IVL

          Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

        • OptionalsendBufferSize?: number

          ZMQ_SNDBUF

          Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

        • OptionalsendHighWaterMark?: number

          ZMQ_SNDHWM

          The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

          If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

        • OptionalsendTimeout?: number

          ZMQ_SNDTIMEO

          Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

        • OptionalsocksProxy?: null | string

          ZMQ_SOCKS_PROXY

          The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

        • OptionaltcpAcceptFilter?: null | string

          ZMQ_TCP_ACCEPT_FILTER

          Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

        • OptionaltcpKeepalive?: number

          ZMQ_TCP_KEEPALIVE

          Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveCount?: number

          ZMQ_TCP_KEEPALIVE_CNT

          Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveIdle?: number

          ZMQ_TCP_KEEPALIVE_IDLE

          Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpKeepaliveInterval?: number

          ZMQ_TCP_KEEPALIVE_INTVL

          Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

        • OptionaltcpMaxRetransmitTimeout?: number

          ZMQ_TCP_MAXRT

          Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

        • OptionaltypeOfService?: number

          ZMQ_TOS

          Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

        • OptionalvmciBufferMaxSize?: number

          ZMQ_VMCI_BUFFER_MAX_SIZE

          Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferMinSize?: number

          ZMQ_VMCI_BUFFER_MIN_SIZE

          Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciBufferSize?: number

          ZMQ_VMCI_BUFFER_SIZE

          The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

        • OptionalvmciConnectTimeout?: number

          ZMQ_VMCI_CONNECT_TIMEOUT

          Connection timeout for the socket. For vmci:// transports only.

        • OptionalzapDomain?: null | string

          ZMQ_ZAP_DOMAIN

          Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

        • OptionalzapEnforceDomain?: boolean

          ZMQ_ZAP_ENFORCE_DOMAIN

          The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

      Returns XSubscriber

    Properties

    affinity: number

    ZMQ_AFFINITY

    I/O thread affinity, which determines which threads from the ØMQ I/O thread pool associated with the socket's context shall handle newly created connections.

    Note: This value is a bit mask, but values higher than Number.MAX_SAFE_INTEGER may not be represented accurately! This currently means that configurations beyond 52 threads are unreliable.

    backlog: number

    ZMQ_BACKLOG

    Maximum length of the queue of outstanding peer connections for the specified socket. This only applies to connection-oriented transports.

    closed: boolean

    Whether this socket was previously closed with close().

    connectTimeout: number

    ZMQ_CONNECT_TIMEOUT

    Sets how long to wait before timing-out a connect() system call. The connect() system call normally takes a long time before it returns a time out error. Setting this option allows the library to time out the call at an earlier interval.

    context: Context

    Context that this socket belongs to.

    curvePublicKey: null | string

    ZMQ_CURVE_PUBLICKEY

    Sets the socket's long term public key. You must set this on CURVE client sockets. A server socket does not need to know its own public key. You can create a new keypair with curveKeyPair().

    curveSecretKey: null | string

    ZMQ_CURVE_SECRETKEY

    Sets the socket's long term secret key. You must set this on both CURVE client and server sockets. You can create a new keypair with curveKeyPair().

    curveServer: boolean

    ZMQ_CURVE_SERVER

    Defines whether the socket will act as server for CURVE security. A value of true means the socket will act as CURVE server. A value of false means the socket will not act as CURVE server, and its security role then depends on other option settings.

    curveServerKey: null | string

    ZMQ_CURVE_SERVERKEY

    Sets the socket's long term server key. This is the public key of the CURVE server socket. You must set this on CURVE client sockets. This key must have been generated together with the server's secret key. You can create a new keypair with curveKeyPair().

    events: Observer

    Event Observer for this socket. This starts up a ØMQ monitoring socket internally that receives all socket events.

    gssapiPlainText: boolean
    gssapiPrincipal: null | string
    gssapiPrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    gssapiServer: boolean
    gssapiServicePrincipal: null | string
    gssapiServicePrincipalNameType: "hostBased" | "userName" | "krb5Principal"
    handshakeInterval: number

    ZMQ_HANDSHAKE_IVL

    Handshaking is the exchange of socket configuration information (socket type, identity, security) that occurs when a connection is first opened (only for connection-oriented transports). If handshaking does not complete within the configured time, the connection shall be closed. The value 0 means no handshake time limit.

    heartbeatInterval: number

    ZMQ_HEARTBEAT_IVL

    Interval in milliseconds between sending ZMTP heartbeats for the specified socket. If this option is greater than 0, then a PING ZMTP command will be sent after every interval.

    heartbeatTimeout: number

    ZMQ_HEARTBEAT_TIMEOUT

    How long (in milliseconds) to wait before timing-out a connection after sending a PING ZMTP command and not receiving any traffic. This option is only valid if heartbeatInterval is greater than 0. The connection will time out if there is no traffic received after sending the PING command. The received traffic does not have to be a PONG command - any received traffic will cancel the timeout.

    heartbeatTimeToLive: number

    ZMQ_HEARTBEAT_TTL

    The timeout in milliseconds on the remote peer for ZMTP heartbeats. If this option is greater than 0, the remote side shall time out the connection if it does not receive any more traffic within the TTL period. This option does not have any effect if heartbeatInterval is 0. Internally, this value is rounded down to the nearest decisecond, any value less than 100 will have no effect.

    immediate: boolean

    ZMQ_IMMEDIATE

    By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (Request, Push, Dealer). If this option is set to true, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

    interface: null | string

    ZMQ_BINDTODEVICE

    Binds the socket to the given network interface (Linux only). Allows to use Linux VRF, see: https://www.kernel.org/doc/Documentation/networking/vrf.txt. Requires the program to be ran as root or with CAP_NET_RAW.

    ipv6: boolean

    ZMQ_IPV6

    Enable or disable IPv6. When IPv6 is enabled, the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

    lastEndpoint: null | string

    ZMQ_LAST_ENDPOINT

    The last endpoint bound for TCP and IPC transports.

    linger: number

    ZMQ_LINGER

    Determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with close().

    loopbackFastPath: boolean

    ZMQ_LOOPBACK_FASTPATH

    Enable faster TCP connections on loopback devices. An application can enable this option to reduce the latency and improve the performance of loopback operations on a TCP socket on Windows.

    maxMessageSize: number

    ZMQ_MAXMSGSIZE

    Limits the size of the inbound message. If a peer sends a message larger than the limit it is disconnected. Value of -1 means no limit.

    multicastHops: number

    ZMQ_MULTICAST_HOPS

    Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

    multicastMaxTransportDataUnit: number

    ZMQ_MULTICAST_MAXTPDU

    Sets the maximum transport data unit size used for outbound multicast packets. This must be set at or below the minimum Maximum Transmission Unit (MTU) for all network paths over which multicast reception is required.

    plainPassword: null | string

    ZMQ_PLAIN_PASSWORD

    Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    plainServer: boolean

    ZMQ_PLAIN_SERVER

    Defines whether the socket will act as server for PLAIN security. A value of true means the socket will act as PLAIN server. A value of false means the socket will not act as PLAIN server, and its security role then depends on other option settings.

    plainUsername: null | string

    ZMQ_PLAIN_USERNAME

    Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN.

    rate: number

    ZMQ_RATE

    Maximum send or receive data rate for multicast transports such as pgm.

    readable: boolean

    Whether any messages are currently available. If true, the next call to Readable.receive() will immediately read a message from the socket. For sockets that cannot receive messsages this is always false.

    receiveBufferSize: number

    ZMQ_RCVBUF

    Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

    receiveHighWaterMark: number

    ZMQ_RCVHWM

    The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    receiveTimeout: number

    ZMQ_RCVTIMEO

    Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

    reconnectInterval: number

    ZMQ_RECONNECT_IVL

    Period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

    reconnectMaxInterval: number

    ZMQ_RECONNECT_IVL_MAX

    Maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled until reconnectMaxInterval is reached. This allows for exponential backoff strategy. Zero (the default) means no exponential backoff is performed and reconnect interval calculations are only based on reconnectInterval.

    recoveryInterval: number

    ZMQ_RECOVERY_IVL

    Maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

    securityMechanism: null | "plain" | "curve" | "gssapi"

    ZMQ_MECHANISM

    Returns the current security mechanism for the socket, if any. The security mechanism is set implictly by using any of the relevant security options. The returned value is one of:

    • null - No security mechanism is used.
    • "plain" - The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality.
    • "curve" - The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks.
    • "gssapi" - The GSSAPI mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server using the Generic Security Service Application Program Interface (GSSAPI). The GSSAPI mechanism can be used on both public and private networks.
    sendBufferSize: number

    ZMQ_SNDBUF

    Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

    sendHighWaterMark: number

    ZMQ_SNDHWM

    The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    sendTimeout: number

    ZMQ_SNDTIMEO

    Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

    socksProxy: null | string

    ZMQ_SOCKS_PROXY

    The SOCKS5 proxy address that shall be used by the socket for the TCP connection(s). Does not support SOCKS5 authentication. If the endpoints are domain names instead of addresses they shall not be resolved and they shall be forwarded unchanged to the SOCKS proxy service in the client connection request message (address type 0x03 domain name).

    tcpAcceptFilter: null | string

    ZMQ_TCP_ACCEPT_FILTER

    Assign a filter that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source IP should be matched. To clear all filters set to null. Filter is a string with IPv6 or IPv4 CIDR.

    tcpKeepalive: number

    ZMQ_TCP_KEEPALIVE

    Override SO_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveCount: number

    ZMQ_TCP_KEEPALIVE_CNT

    Overrides TCP_KEEPCNT socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveIdle: number

    ZMQ_TCP_KEEPALIVE_IDLE

    Overrides TCP_KEEPIDLE / TCP_KEEPALIVE socket option (if supported by OS). The default value of -1 leaves it to the OS default.

    tcpKeepaliveInterval: number

    ZMQ_TCP_KEEPALIVE_INTVL

    Overrides TCP_KEEPINTVL socket option (if supported by the OS). The default value of -1 leaves it to the OS default.

    tcpMaxRetransmitTimeout: number

    ZMQ_TCP_MAXRT

    Sets how long before an unacknowledged TCP retransmit times out (if supported by the OS). The system normally attempts many TCP retransmits following an exponential backoff strategy. This means that after a network outage, it may take a long time before the session can be re-established. Setting this option allows the timeout to happen at a shorter interval.

    threadSafe: boolean

    ZMQ_THREAD_SAFE

    Whether or not the socket is threadsafe. Currently only DRAFT sockets is thread-safe.

    type: SocketType

    ZMQ_TYPE

    Retrieve the socket type. This is fairly useless because you can test the socket class with e.g. socket instanceof Dealer.

    typeOfService: number

    ZMQ_TOS

    Sets the ToS fields (the Differentiated Services (DS) and Explicit Congestion Notification (ECN) field) of the IP header. The ToS field is typically used to specify a packet's priority. The availability of this option is dependent on intermediate network equipment that inspect the ToS field and provide a path for low-delay, high-throughput, highly-reliable service, etc.

    vmciBufferMaxSize: number

    ZMQ_VMCI_BUFFER_MAX_SIZE

    Maximum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferMinSize: number

    ZMQ_VMCI_BUFFER_MIN_SIZE

    Minimum size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciBufferSize: number

    ZMQ_VMCI_BUFFER_SIZE

    The size of the underlying buffer for the socket. Used during negotiation before the connection is established. For vmci:// transports only.

    vmciConnectTimeout: number

    ZMQ_VMCI_CONNECT_TIMEOUT

    Connection timeout for the socket. For vmci:// transports only.

    writable: boolean

    Whether any messages can be queued for sending. If true, the next call to Writable.send() will immediately queue a message on the socket. For sockets that cannot send messsages this is always false.

    zapDomain: null | string

    ZMQ_ZAP_DOMAIN

    Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

    zapEnforceDomain: boolean

    ZMQ_ZAP_ENFORCE_DOMAIN

    The ZAP (ZMQ RFC 27) authentication protocol specifies that a domain must always be set. Older versions of libzmq did not follow the spec and allowed an empty domain to be set. This option can be used to enabled or disable the stricter, backward incompatible behaviour. For now it is disabled by default, but in a future version it will be enabled by default.

    Methods

    • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

      for await (const [msg] of socket) {
      // handle messages
      } +

      Returns AsyncIterator<Buffer[]>

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      await socket.bind("tcp://127.0.0.1:3456")
      await socket.bind("tcp://*:3456") // binds on all interfaces
      await socket.bind("tcp://127.0.0.1:*") // binds on random port +

      Parameters

      • address: string

        Address to bind this socket to.

      Returns Promise<void>

      Resolved when the socket was successfully bound.

    • Binds the socket to the given address. During bind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      You can use * in place of a hostname to bind on all interfaces/addresses, and you can use * in place of a port to bind to a random port (which can be retrieved with lastEndpoint later).

      socket.bindSync("tcp://127.0.0.1:3456")
      socket.bindSync("tcp://*:3456") // binds on all interfaces
      socket.bindSync("tcp://127.0.0.1:*") // binds on random port +

      Parameters

      • address: string

        Address to bind this socket to.

      Returns void

      Resolved when the socket was successfully bound.

    • Closes the socket and disposes of all resources. Any messages that are queued may be discarded or sent in the background depending on the linger setting.

      After this method is called, it is no longer possible to call any other methods on this socket.

      Sockets that go out of scope and have no Readable.receive() or Writable.send() operations in progress will automatically be closed. Therefore it is not necessary in most applications to call close() manually.

      Calling this method on a socket that is already closed is a no-op.

      Returns void

    • Connects to the socket at the given remote address and returns immediately. The connection will be made asynchronously in the background.

      socket.connect("tcp://127.0.0.1:3456")
      +

      Parameters

      • address: string

        The address to connect to.

      Returns void

    • Disconnects a previously connected socket from the given address and returns immediately. Disonnection will happen asynchronously in the background.

      socket.disconnect("tcp://127.0.0.1:3456")
      +

      Parameters

      • address: string

        The previously connected address to disconnect from.

      Returns void

    • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

      const [msg] = await socket.receive()
      const [part1, part2] = await socket.receive() +

      Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

      A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

      Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

      socket.receive() // -> pending promise until read is possible
      socket.receive() // -> promise rejection with `EBUSY` error +

      Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

      Returns Promise<Buffer[]>

      Resolved with message parts that were successfully read.

    • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

      await socket.send("hello world")
      await socket.send(["hello", "world"]) +

      Queueing may fail eventually if the socket has been configured with a sendTimeout.

      A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

      Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

      The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

      For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

      • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

        • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

        • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

      • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

      • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

      Parameters

      • message: MessageLike | MessageLike[]

        Single message or multipart message to queue for sending.

      • ...options: []

        Any options, if applicable to the socket type (DRAFT only).

      Returns Promise<void>

      Resolved when the message was successfully queued.

    • Parameters

      • option: number
      • value: boolean

      Returns void

    • Parameters

      • option: number
      • value: null | string | Buffer

      Returns void

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns Promise<void>

      Resolved when the socket was successfully unbound.

    • Unbinds the socket to the given address. During unbind() the socket cannot be used. Do not call any other methods until the returned promise resolves. Make sure to use await.

      Parameters

      • address: string

        Address to unbind this socket from.

      Returns void

      Resolved when the socket was successfully unbound.

    \ No newline at end of file diff --git a/functions/curveKeyPair.html b/functions/curveKeyPair.html index 6ad0b866..9dfc9eed 100644 --- a/functions/curveKeyPair.html +++ b/functions/curveKeyPair.html @@ -1 +1 @@ -curveKeyPair | zeromq.js

    Function curveKeyPair

    • Returns a new random key pair to be used with the CURVE security mechanism.

      To correctly connect two sockets with this mechanism:

      Returns {
          publicKey: string;
          secretKey: string;
      }

      An object with a publicKey and a secretKey property, each being a 40 character Z85-encoded string.

      • publicKey: string
      • secretKey: string
    \ No newline at end of file +curveKeyPair | zeromq.js

    Function curveKeyPair

    • Returns a new random key pair to be used with the CURVE security mechanism.

      To correctly connect two sockets with this mechanism:

      Returns { publicKey: string; secretKey: string }

      An object with a publicKey and a secretKey property, each being a 40 character Z85-encoded string.

    \ No newline at end of file diff --git a/hierarchy.html b/hierarchy.html index aec58cef..e4f81d83 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -1 +1 @@ -zeromq.js
    \ No newline at end of file +zeromq.js
    \ No newline at end of file diff --git a/index.html b/index.html index 0593e3f8..ee0a159b 100644 --- a/index.html +++ b/index.html @@ -1,22 +1,22 @@ -zeromq.js

    zeromq.js

    ZeroMQ.js Next Generation

    Latest version

    ØMQ bindings for Node.js. The goals of this library are:

    • Semantically similar to the native ØMQ library, while sticking to JavaScript idioms.
    • Use modern JavaScript and Node.js features such as async/await and async iterators.
    • High performance.
    • Fully usable with TypeScript (3+).
    • Compatible with Zeromq 4/5 via "zeromq/v5-compat"

    Install ZeroMQ.js with prebuilt binaries:

    npm install zeromq
    -

    Supported versions:

    • Node.js v12 (requires a N-API)

    The following platforms have a prebuilt binary available:

    • Windows on x86/x86-64

      Zeromq binaries on Windows 10 or older need Visual C++ Redistributable to be installed.

    • Linux on x86-64 with libstdc++.so.6.0.21+ (glibc++ 3.4.21+), for example:

      • Debian 9+ (Stretch or later)
      • Ubuntu 16.04+ (Xenial or later)
      • CentOS 8+
    • Linux on x86-64 with musl, for example:

      • Alpine 3.3+
    • MacOS 10.9+ on x86-64

    If a prebuilt binary is not available for your platform, installing will attempt to start a build from source.

    If a prebuilt binary is unavailable or if you want to pass certain options during build, you can build this package from source.

    Make sure you have the following installed before attempting to build from source:

    • Node.js 12+ or Electron
    • A working C++17 compiler toolchain with make
    • Python 3 with Node 12+ (or legacy Python 2.7)
    • CMake 2.8+
    • curl

    To install from source, specify build_from_source=true in a .npmrc file

    build_from_source=true
    -

    When building from source, you can also specify additional build options in a .npmrc file in your project:

    👉🏻 Options

    Enables CURVE security for encrypted communications. To enable CURVE support, add the following to your .npmrc:

    zmq_curve="true"
    -

    Enable libsodium for CURVE security instead of the built-in tweetnacl implementation. This can provide better performance for CURVE operations. To use libsodium, add the following to your .npmrc:

    zmq_sodium="true"
    -

    By default libzmq is built with support for Draft patterns (e.g. server-client, radio-dish, scatter-gather). If you want to build libzmq without support for Draft, you can specify the following in .npmrc:

    zmq_draft=false
    -

    Enables WebSocket transport, allowing ZeroMQ to communicate over WebSockets. To enable WebSocket support, add the following to your .npmrc:

    zmq_websockets="true"
    -

    Enables WebSocket transport with TLS (wss), providing secure WebSocket communications. To enable secure WebSocket support, add the following to your .npmrc:

    zmq_websockets_secure="true"
    -

    Enables immediate send/receive on the socket without synchronous resolution. This option can improve performance in certain scenarios by allowing operations to proceed without waiting for synchronous resolution. To enable this feature, add the following to your .npmrc:

    zmq_no_sync_resolve="true"
    -

    Specifies the minimum macOS version that the binary will be compatible with. This is particularly useful when building for different macOS versions. To set this, add the following to your .npmrc, replacing 10.15 with your desired minimum macOS version:

    macosx_deployment_target="10.15"
    -

    Here some examples of different features are provided. More examples can be found in the examples directory.

    You can also browse the API reference documentation to see all socket types, methods & options as well as more detailed information about how to apply them.

    Note: If you are new to ZeroMQ, please start with the ZeroMQ documentation.

    ES modules:

    import {Request} from "zeromq"
    // or as namespace
    import * as zmq from "zeromq"

    const reqSock = new Request()
    //...
    const repSock = new zmq.Reply() +zeromq.js

    zeromq.js

    ZeroMQ.js Next Generation

    Latest version

    ØMQ bindings for Node.js. The goals of this library are:

    • Semantically similar to the native ØMQ library, while sticking to JavaScript idioms.
    • Use modern JavaScript and Node.js features such as async/await and async iterators.
    • High performance.
    • Fully usable with TypeScript (3+).
    • Compatible with Zeromq 4/5 via "zeromq/v5-compat"
    • Secure Curve protocol with Libsodium
    • Zeromq Draft API support

    Install ZeroMQ.js with prebuilt binaries:

    npm install zeromq
    +

    Supported versions:

    • Node.js v12 (requires a N-API)

    The following platforms have a prebuilt binary available:

    • Windows on x86/x86-64

      Zeromq binaries on Windows 10 or older need Visual C++ Redistributable to be installed.

    • Linux on x86-64 with libstdc++.so.6.0.21+ (glibc++ 3.4.21+), for example:

      • Debian 9+ (Stretch or later)
      • Ubuntu 16.04+ (Xenial or later)
      • CentOS 8+
    • Linux on x86-64 with musl, for example:

      • Alpine 3.3+
    • MacOS 10.9+ on x86-64

    If a prebuilt binary is not available for your platform, installing will attempt to start a build from source.

    If a prebuilt binary is unavailable, or if you want to pass certain options during build, you can build this package from source.

    Make sure you have the following installed before attempting to build from source:

    • Node.js 10+ or Electron
    • C++17 compiler toolchain (e.g. LLVM, GCC, MSVC)
    • Python 3
    • CMake 3.16+
    • vcpkg dependencies (e.g. on Linux it needs curl, unzip, zip, tar, git, pkg-config)

    For Curve:

    • automake
    • autoconf
    • libtool

    To install from source, specify build_from_source=true in a .npmrc file

    build_from_source=true
    +

    When building from source, you can also specify additional build options in a .npmrc file in your project:

    👉🏻 Options

    (Enabled by default)

    Enables CURVE security for encrypted communications. Zeromq uses libsodium for CURVE security. To enable CURVE support, add the following to your .npmrc:

    zmq_curve="true"
    +zmq_sodium="true"
    +

    Building libsodium requires these dependencies on Linux/MacOS: autoconf automake libtool, which can be installed via apt-get or brew, etc.

    (Enabled by default)

    By default libzmq is built with support for Draft patterns (e.g. server-client, radio-dish, scatter-gather). If you want to build libzmq without support for Draft, you can specify the following in .npmrc:

    zmq_draft=false
    +

    Enables WebSocket transport, allowing ZeroMQ to communicate over WebSockets. To enable WebSocket support, add the following to your .npmrc:

    zmq_websockets="true"
    +

    Enables WebSocket transport with TLS (wss), providing secure WebSocket communications. To enable secure WebSocket support, add the following to your .npmrc:

    zmq_websockets_secure="true"
    +

    Enables immediate send/receive on the socket without synchronous resolution. This option can improve performance in certain scenarios by allowing operations to proceed without waiting for synchronous resolution. To enable this feature, add the following to your .npmrc:

    zmq_no_sync_resolve="true"
    +

    Specifies the minimum macOS version that the binary will be compatible with. This is particularly useful when building for different macOS versions. To set this, add the following to your .npmrc, replacing 10.15 with your desired minimum macOS version:

    macosx_deployment_target="10.15"
    +

    Here some examples of different features are provided. More examples can be found in the examples directory.

    You can also browse the API reference documentation to see all socket types, methods & options as well as more detailed information about how to apply them.

    Note: If you are new to ZeroMQ, please start with the ZeroMQ documentation.

    ES modules:

    import {Request} from "zeromq"
    // or as namespace
    import * as zmq from "zeromq"

    const reqSock = new Request()
    //...
    const repSock = new zmq.Reply()

    Commonjs:

    const zmq = require("zeromq")

    const reqSock = new zmq.Request()
    //...
    const repSock = new zmq.Reply() -

    This example demonstrates how a producer pushes information onto a socket and how a worker pulls information from the socket.

    Creates a producer to push information onto a socket.

    import * as zmq from "zeromq"

    async function run() {
    const sock = new zmq.Push()

    await sock.bind("tcp://127.0.0.1:3000")
    console.log("Producer bound to port 3000")

    while (true) {
    await sock.send("some work")
    await new Promise(resolve => {
    setTimeout(resolve, 500)
    })
    }
    }

    run() -

    Creates a worker to pull information from the socket.

    import * as zmq from "zeromq"

    async function run() {
    const sock = new zmq.Pull()

    sock.connect("tcp://127.0.0.1:3000")
    console.log("Worker connected to port 3000")

    for await (const [msg] of sock) {
    console.log("work: %s", msg.toString())
    }
    }

    run() -

    This example demonstrates using zeromq in a classic Pub/Sub, Publisher/Subscriber, application.

    Create the publisher which sends messages.

    import * as zmq from "zeromq"

    async function run() {
    const sock = new zmq.Publisher()

    await sock.bind("tcp://127.0.0.1:3000")
    console.log("Publisher bound to port 3000")

    while (true) {
    console.log("sending a multipart message envelope")
    await sock.send(["kitty cats", "meow!"])
    await new Promise(resolve => {
    setTimeout(resolve, 500)
    })
    }
    }

    run() -

    Create a subscriber to connect to a publisher's port to receive messages.

    import * as zmq from "zeromq"

    async function run() {
    const sock = new zmq.Subscriber()

    sock.connect("tcp://127.0.0.1:3000")
    sock.subscribe("kitty cats")
    console.log("Subscriber connected to port 3000")

    for await (const [topic, msg] of sock) {
    console.log(
    "received a message related to:",
    topic,
    "containing message:",
    msg,
    )
    }
    }

    run() -

    This example illustrates a request from a client and a reply from a server.

    import * as zmq from "zeromq"

    async function run() {
    const sock = new zmq.Request()

    sock.connect("tcp://127.0.0.1:3000")
    console.log("Producer bound to port 3000")

    await sock.send("4")
    const [result] = await sock.receive()

    console.log(result)
    }

    run() -
    import * as zmq from "zeromq"

    async function run() {
    const sock = new zmq.Reply()

    await sock.bind("tcp://127.0.0.1:3000")

    for await (const [msg] of sock) {
    await sock.send((2 * parseInt(msg.toString(), 10)).toString())
    }
    }

    run() -

    The next generation version of the library features a compatibility layer for ZeroMQ.js versions 4 and 5. This is recommended for users upgrading from previous versions.

    Example:

    const zmq = require("zeromq/v5-compat")

    const pub = zmq.socket("pub")
    const sub = zmq.socket("sub")

    pub.bind("tcp://*:3456", err => {
    if (err) throw err

    sub.connect("tcp://127.0.0.1:3456")

    pub.send("message")

    sub.on("message", msg => {
    // Handle received message...
    })
    }) -

    This library provides typings for TypeScript version 3.0.x and later.

    Requirements

    • For TypeScript version >= 3:
    • For TypeScript version < 3.6:
      • either set compilerOptions.target to esnext or later (e.g. es2018)
      • or add the following, or similar, libraries to compilerOptions.lib (and include their corresponding polyfills if needed): es2015, ESNext.AsyncIterable

    If you are interested in making contributions to this project, please read the following sections.

    In order to develop and test the library, you'll need the tools required to build from source (see above).

    Additionally, having clang-format is strongly recommended.

    Socket and context options can be set at runtime, even if they are not implemented by this library. By design, this requires no recompilation if the built version of ZeroMQ has support for them. This allows library users to test and use options that have been introduced in recent versions of ZeroMQ without having to modify this library. Of course we'd love to include support for new options in an idiomatic way.

    Options can be set as follows:

    const {Dealer} = require("zeromq")

    /* This defines an accessor named 'sendHighWaterMark', which corresponds to
    the constant ZMQ_SNDHWM, which is defined as '23' in zmq.h. The option takes
    integers. The accessor name has been converted to idiomatic JavaScript.
    Of course, this particular option already exists in this library. */
    class MyDealer extends Dealer {
    get sendHighWaterMark(): number {
    return this.getInt32Option(23)
    }

    set sendHighWaterMark(value: number) {
    this.setInt32Option(23, value)
    }
    }

    const sock = new MyDealer({sendHighWaterMark: 456}) -

    When submitting pull requests for new socket/context options, please consider the following:

    • The option is documented in the TypeScript interface.
    • The option is only added to relevant socket types, and if the ZMQ_ constant has a prefix indicating which type it applies to, it is stripped from the name as it is exposed in JavaScript.
    • The name as exposed in this library is idiomatic for JavaScript, spelling out any abbreviations and using proper camelCase naming conventions.
    • The option is a value that can be set on a socket, and you don't think it should actually be a method.

    The test suite can be run with:

    npm install
    npm run build
    npm run test -

    The test suite will validate and fix the coding style, run all unit tests and verify the validity of the included TypeScript type definitions.

    Some tests are not enabled by default:

    • API Compatibility tests from ZeroMQ 5.x have been disabled by default. You can include the tests with INCLUDE_COMPAT_TESTS=1 npm run test
    • Some transports are not reliable on some older versions of ZeroMQ, the relevant tests will be skipped for those versions automatically.

    To publish a new version, run:

    npm version <new version>
    git push && git push --tags -

    Wait for continuous integration to finish. Prebuilds will be generated for all supported platforms and attached to a Github release. Documentation is automatically generated and committed to gh-pages. Finally, a new NPM package version will be automatically released.

    Version 6+ is a complete rewrite of previous versions of ZeroMQ.js in order to be more reliable, correct, and usable in modern JavaScript & TypeScript code as first outlined in this issue. Previous versions of ZeroMQ.js were based on zmq and a fork that included prebuilt binaries.

    See detailed changes in the CHANGELOG.

    \ No newline at end of file +

    This example demonstrates how a producer pushes information onto a socket and how a worker pulls information from the socket.

    Creates a producer to push information onto a socket.

    import * as zmq from "zeromq"

    async function run() {
    const sock = new zmq.Push()

    await sock.bind("tcp://127.0.0.1:3000")
    console.log("Producer bound to port 3000")

    while (true) {
    await sock.send("some work")
    await new Promise(resolve => {
    setTimeout(resolve, 500)
    })
    }
    }

    run() +

    Creates a worker to pull information from the socket.

    import * as zmq from "zeromq"

    async function run() {
    const sock = new zmq.Pull()

    sock.connect("tcp://127.0.0.1:3000")
    console.log("Worker connected to port 3000")

    for await (const [msg] of sock) {
    console.log("work: %s", msg.toString())
    }
    }

    run() +

    This example demonstrates using zeromq in a classic Pub/Sub, Publisher/Subscriber, application.

    Create the publisher which sends messages.

    import * as zmq from "zeromq"

    async function run() {
    const sock = new zmq.Publisher()

    await sock.bind("tcp://127.0.0.1:3000")
    console.log("Publisher bound to port 3000")

    while (true) {
    console.log("sending a multipart message envelope")
    await sock.send(["kitty cats", "meow!"])
    await new Promise(resolve => {
    setTimeout(resolve, 500)
    })
    }
    }

    run() +

    Create a subscriber to connect to a publisher's port to receive messages.

    import * as zmq from "zeromq"

    async function run() {
    const sock = new zmq.Subscriber()

    sock.connect("tcp://127.0.0.1:3000")
    sock.subscribe("kitty cats")
    console.log("Subscriber connected to port 3000")

    for await (const [topic, msg] of sock) {
    console.log(
    "received a message related to:",
    topic,
    "containing message:",
    msg,
    )
    }
    }

    run() +

    This example illustrates a request from a client and a reply from a server.

    import * as zmq from "zeromq"

    async function run() {
    const sock = new zmq.Request()

    sock.connect("tcp://127.0.0.1:3000")
    console.log("Producer bound to port 3000")

    await sock.send("4")
    const [result] = await sock.receive()

    console.log(result)
    }

    run() +
    import * as zmq from "zeromq"

    async function run() {
    const sock = new zmq.Reply()

    await sock.bind("tcp://127.0.0.1:3000")

    for await (const [msg] of sock) {
    await sock.send((2 * parseInt(msg.toString(), 10)).toString())
    }
    }

    run() +

    The next generation version of the library features a compatibility layer for ZeroMQ.js versions 4 and 5. This is recommended for users upgrading from previous versions.

    Example:

    const zmq = require("zeromq/v5-compat")

    const pub = zmq.socket("pub")
    const sub = zmq.socket("sub")

    pub.bind("tcp://*:3456", err => {
    if (err) throw err

    sub.connect("tcp://127.0.0.1:3456")

    pub.send("message")

    sub.on("message", msg => {
    // Handle received message...
    })
    }) +

    This library provides typings for TypeScript version 3.0.x and later.

    Requirements

    • For TypeScript version >= 3:
    • For TypeScript version < 3.6:
      • either set compilerOptions.target to esnext or later (e.g. es2018)
      • or add the following, or similar, libraries to compilerOptions.lib (and include their corresponding polyfills if needed): es2015, ESNext.AsyncIterable

    If you are interested in making contributions to this project, please read the following sections.

    In order to develop and test the library, you'll need the tools required to build from source (see above).

    Additionally, having clang-format is strongly recommended.

    Socket and context options can be set at runtime, even if they are not implemented by this library. By design, this requires no recompilation if the built version of ZeroMQ has support for them. This allows library users to test and use options that have been introduced in recent versions of ZeroMQ without having to modify this library. Of course we'd love to include support for new options in an idiomatic way.

    Options can be set as follows:

    const {Dealer} = require("zeromq")

    /* This defines an accessor named 'sendHighWaterMark', which corresponds to
    the constant ZMQ_SNDHWM, which is defined as '23' in zmq.h. The option takes
    integers. The accessor name has been converted to idiomatic JavaScript.
    Of course, this particular option already exists in this library. */
    class MyDealer extends Dealer {
    get sendHighWaterMark(): number {
    return this.getInt32Option(23)
    }

    set sendHighWaterMark(value: number) {
    this.setInt32Option(23, value)
    }
    }

    const sock = new MyDealer({sendHighWaterMark: 456}) +

    When submitting pull requests for new socket/context options, please consider the following:

    • The option is documented in the TypeScript interface.
    • The option is only added to relevant socket types, and if the ZMQ_ constant has a prefix indicating which type it applies to, it is stripped from the name as it is exposed in JavaScript.
    • The name as exposed in this library is idiomatic for JavaScript, spelling out any abbreviations and using proper camelCase naming conventions.
    • The option is a value that can be set on a socket, and you don't think it should actually be a method.

    The test suite can be run with:

    npm install
    npm run build
    npm run test +

    The test suite will validate and fix the coding style, run all unit tests and verify the validity of the included TypeScript type definitions.

    Some tests are not enabled by default:

    • API Compatibility tests from ZeroMQ 5.x have been disabled by default. You can include the tests with INCLUDE_COMPAT_TESTS=1 npm run test
    • Some transports are not reliable on some older versions of ZeroMQ, the relevant tests will be skipped for those versions automatically.

    To publish a new version, run:

    npm version <new version>
    git push && git push --tags +

    Wait for continuous integration to finish. Prebuilds will be generated for all supported platforms and attached to a Github release. Documentation is automatically generated and committed to gh-pages. Finally, a new NPM package version will be automatically released.

    Version 6+ is a complete rewrite of previous versions of ZeroMQ.js in order to be more reliable, correct, and usable in modern JavaScript & TypeScript code as first outlined in this issue. Previous versions of ZeroMQ.js were based on zmq and a fork that included prebuilt binaries.

    See detailed changes in the CHANGELOG.

    \ No newline at end of file diff --git a/interfaces/EventSubscriber.html b/interfaces/EventSubscriber.html index 641f2a28..847750cf 100644 --- a/interfaces/EventSubscriber.html +++ b/interfaces/EventSubscriber.html @@ -1,2 +1,2 @@ -EventSubscriber | zeromq.js

    Interface EventSubscriber

    interface EventSubscriber {
        off<E>(type: E, listener: ((data: EventOfType<E>) => void)): EventSubscriber;
        on<E>(type: E, listener: ((data: EventOfType<E>) => void)): EventSubscriber;
    }

    Hierarchy (view full)

    Methods

    Methods

    • Removes the specified listener function from the list of functions to call when the given event is observed.

      Type Parameters

      • E extends
            | "unknown"
            | "connect"
            | "disconnect"
            | "close"
            | "end"
            | "accept"
            | "accept:error"
            | "bind"
            | "bind:error"
            | "connect:delay"
            | "connect:retry"
            | "close:error"
            | "handshake"
            | "handshake:error:protocol"
            | "handshake:error:auth"
            | "handshake:error:other"

      Parameters

      • type: E

        The type of event that the listener was listening for.

      • listener: ((data: EventOfType<E>) => void)

        The previously registered listener function.

      Returns EventSubscriber

    • Adds a listener function which will be invoked when the given event type is observed. Calling this method will convert the Observer to event emitter mode, which will make it impossible to call Observer.receive() at the same time.

      socket.events.on("bind", event => {
      console.log(`Socket bound to ${event.address}`)
      // ...
      }) -

      Type Parameters

      • E extends
            | "unknown"
            | "connect"
            | "disconnect"
            | "close"
            | "end"
            | "accept"
            | "accept:error"
            | "bind"
            | "bind:error"
            | "connect:delay"
            | "connect:retry"
            | "close:error"
            | "handshake"
            | "handshake:error:protocol"
            | "handshake:error:auth"
            | "handshake:error:other"

      Parameters

      • type: E

        The type of event to listen for.

      • listener: ((data: EventOfType<E>) => void)

        The listener function that will be called with all event data when the event is observed.

      Returns EventSubscriber

    \ No newline at end of file +EventSubscriber | zeromq.js

    Interface EventSubscriber

    interface EventSubscriber {
        off<
            E extends
                | "unknown"
                | "connect"
                | "disconnect"
                | "close"
                | "end"
                | "accept"
                | "accept:error"
                | "bind"
                | "bind:error"
                | "connect:delay"
                | "connect:retry"
                | "close:error"
                | "handshake"
                | "handshake:error:protocol"
                | "handshake:error:auth"
                | "handshake:error:other",
        >(
            type: E,
            listener: (data: EventOfType<E>) => void,
        ): EventSubscriber;
        on<
            E extends
                | "unknown"
                | "connect"
                | "disconnect"
                | "close"
                | "end"
                | "accept"
                | "accept:error"
                | "bind"
                | "bind:error"
                | "connect:delay"
                | "connect:retry"
                | "close:error"
                | "handshake"
                | "handshake:error:protocol"
                | "handshake:error:auth"
                | "handshake:error:other",
        >(
            type: E,
            listener: (data: EventOfType<E>) => void,
        ): EventSubscriber;
    }

    Hierarchy (View Summary)

    Methods

    Methods

    • Removes the specified listener function from the list of functions to call when the given event is observed.

      Type Parameters

      • E extends
            | "unknown"
            | "connect"
            | "disconnect"
            | "close"
            | "end"
            | "accept"
            | "accept:error"
            | "bind"
            | "bind:error"
            | "connect:delay"
            | "connect:retry"
            | "close:error"
            | "handshake"
            | "handshake:error:protocol"
            | "handshake:error:auth"
            | "handshake:error:other"

      Parameters

      • type: E

        The type of event that the listener was listening for.

      • listener: (data: EventOfType<E>) => void

        The previously registered listener function.

      Returns EventSubscriber

    • Adds a listener function which will be invoked when the given event type is observed. Calling this method will convert the Observer to event emitter mode, which will make it impossible to call Observer.receive() at the same time.

      socket.events.on("bind", event => {
      console.log(`Socket bound to ${event.address}`)
      // ...
      }) +

      Type Parameters

      • E extends
            | "unknown"
            | "connect"
            | "disconnect"
            | "close"
            | "end"
            | "accept"
            | "accept:error"
            | "bind"
            | "bind:error"
            | "connect:delay"
            | "connect:retry"
            | "close:error"
            | "handshake"
            | "handshake:error:protocol"
            | "handshake:error:auth"
            | "handshake:error:other"

      Parameters

      • type: E

        The type of event to listen for.

      • listener: (data: EventOfType<E>) => void

        The listener function that will be called with all event data when the event is observed.

      Returns EventSubscriber

    \ No newline at end of file diff --git a/interfaces/Readable.html b/interfaces/Readable.html index 0a364d61..4a13fa3f 100644 --- a/interfaces/Readable.html +++ b/interfaces/Readable.html @@ -1,4 +1,4 @@ -Readable | zeromq.js

    Interface Readable<M>

    Describes sockets that can receive messages.

    M The type of the message or message parts that can be read.

    interface Readable<M> {
        receiveBufferSize: number;
        receiveHighWaterMark: number;
        receiveTimeout: number;
        [asyncIterator](): AsyncIterator<M, undefined, undefined>;
        receive(): Promise<M>;
    }

    Type Parameters

    Hierarchy (view full)

    Properties

    receiveBufferSize: number

    ZMQ_RCVBUF

    Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

    receiveHighWaterMark: number

    ZMQ_RCVHWM

    The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    receiveTimeout: number

    ZMQ_RCVTIMEO

    Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

    Methods

    • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

      for await (const [msg] of socket) {
      // handle messages
      } -

      Returns AsyncIterator<M, undefined, undefined>

    • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

      const [msg] = await socket.receive()
      const [part1, part2] = await socket.receive() -

      Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

      A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

      Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

      socket.receive() // -> pending promise until read is possible
      socket.receive() // -> promise rejection with `EBUSY` error -

      Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

      Returns Promise<M>

      Resolved with message parts that were successfully read.

    \ No newline at end of file +Readable | zeromq.js

    Interface Readable<M>

    Describes sockets that can receive messages.

    M The type of the message or message parts that can be read.

    interface Readable<M extends object[] = Message[]> {
        receiveBufferSize: number;
        receiveHighWaterMark: number;
        receiveTimeout: number;
        "[asyncIterator]"(): AsyncIterator<M>;
        receive(): Promise<M>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Properties

    receiveBufferSize: number

    ZMQ_RCVBUF

    Underlying kernel receive buffer size in bytes. A value of -1 means leave the OS default unchanged.

    receiveHighWaterMark: number

    ZMQ_RCVHWM

    The high water mark is a hard limit on the maximum number of incoming messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    receiveTimeout: number

    ZMQ_RCVTIMEO

    Sets the timeout receiving messages on the socket. If the value is 0, receive() will return a rejected promise immediately if there is no message to receive. If the value is -1, it will wait asynchronously until a message is available. For all other values, it will wait for a message for that amount of time before rejecting.

    Methods

    • Asynchronously iterate over messages becoming available on the socket. When the socket is closed with Socket.close(), the iterator will return. Returning early from the iterator will not close the socket unless it also goes out of scope.

      for await (const [msg] of socket) {
      // handle messages
      } +

      Returns AsyncIterator<M>

    • Waits for the next single or multipart message to become availeble on the socket. Reads a message immediately if possible. If no messages can be read, it will wait asynchonously. The promise will be resolved with an array containing the parts of the next message when available.

      const [msg] = await socket.receive()
      const [part1, part2] = await socket.receive() +

      Reading may fail (eventually) if the socket has been configured with a receiveTimeout.

      A call to receive() is guaranteed to return with a resolved promise immediately if a message could be read from the socket directly.

      Only one asynchronously blocking call to receive() can be in progress simultaneously. If you call receive() again on the same socket it will return a rejected promise with an EBUSY error. For example, if no messages can be read and no await is used:

      socket.receive() // -> pending promise until read is possible
      socket.receive() // -> promise rejection with `EBUSY` error +

      Note: Due to the nature of Node.js and to avoid blocking the main thread, this method always attempts to read messages with the ZMQ_DONTWAIT flag. It polls asynchronously if reading is not currently possible. This means that all functionality related to timeouts and blocking behaviour is reimplemented in the Node.js bindings. Any differences in behaviour with the native ZMQ library is considered a bug.

      Returns Promise<M>

      Resolved with message parts that were successfully read.

    \ No newline at end of file diff --git a/interfaces/RouterConnectOptions.html b/interfaces/RouterConnectOptions.html index 71a019e0..90afe179 100644 --- a/interfaces/RouterConnectOptions.html +++ b/interfaces/RouterConnectOptions.html @@ -1 +1 @@ -RouterConnectOptions | zeromq.js

    Interface RouterConnectOptions

    interface RouterConnectOptions {
        routingId?: string;
    }

    Properties

    Properties

    routingId?: string
    \ No newline at end of file +RouterConnectOptions | zeromq.js

    Interface RouterConnectOptions

    interface RouterConnectOptions {
        routingId?: string;
    }

    Properties

    Properties

    routingId?: string
    \ No newline at end of file diff --git a/interfaces/StreamConnectOptions.html b/interfaces/StreamConnectOptions.html index 4457109a..63a3e2ee 100644 --- a/interfaces/StreamConnectOptions.html +++ b/interfaces/StreamConnectOptions.html @@ -1 +1 @@ -StreamConnectOptions | zeromq.js

    Interface StreamConnectOptions

    interface StreamConnectOptions {
        routingId?: string;
    }

    Properties

    Properties

    routingId?: string
    \ No newline at end of file +StreamConnectOptions | zeromq.js

    Interface StreamConnectOptions

    interface StreamConnectOptions {
        routingId?: string;
    }

    Properties

    Properties

    routingId?: string
    \ No newline at end of file diff --git a/interfaces/Writable.html b/interfaces/Writable.html index 606429ac..47f850c5 100644 --- a/interfaces/Writable.html +++ b/interfaces/Writable.html @@ -1,2 +1,2 @@ -Writable | zeromq.js

    Interface Writable<M, O>

    Describes sockets that can send messages.

    M The type of the message or message parts that can be sent.

    O Rest type for any options, if applicable to the socket type (DRAFT only).

    interface Writable<M, O> {
        multicastHops: number;
        sendBufferSize: number;
        sendHighWaterMark: number;
        sendTimeout: number;
        send(message: M, ...options: O): Promise<void>;
    }

    Type Parameters

    Hierarchy (view full)

    Properties

    multicastHops: number

    ZMQ_MULTICAST_HOPS

    Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

    sendBufferSize: number

    ZMQ_SNDBUF

    Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

    sendHighWaterMark: number

    ZMQ_SNDHWM

    The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    sendTimeout: number

    ZMQ_SNDTIMEO

    Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

    Methods

    • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

      await socket.send("hello world")
      await socket.send(["hello", "world"]) -

      Queueing may fail eventually if the socket has been configured with a sendTimeout.

      A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

      Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

      The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

      For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

      • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

        • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

        • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

      • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

      • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

      Parameters

      • message: M

        Single message or multipart message to queue for sending.

      • Rest...options: O

        Any options, if applicable to the socket type (DRAFT only).

      Returns Promise<void>

      Resolved when the message was successfully queued.

    \ No newline at end of file +Writable | zeromq.js

    Interface Writable<M, O>

    Describes sockets that can send messages.

    M The type of the message or message parts that can be sent.

    O Rest type for any options, if applicable to the socket type (DRAFT only).

    interface Writable<
        M extends MessageLike
        | MessageLike[] = MessageLike | MessageLike[],
        O extends [...object[]] = [],
    > {
        multicastHops: number;
        sendBufferSize: number;
        sendHighWaterMark: number;
        sendTimeout: number;
        send(message: M, ...options: O): Promise<void>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Properties

    multicastHops: number

    ZMQ_MULTICAST_HOPS

    Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network.

    sendBufferSize: number

    ZMQ_SNDBUF

    Underlying kernel transmit buffer size in bytes. A value of -1 means leave the OS default unchanged.

    sendHighWaterMark: number

    ZMQ_SNDHWM

    The high water mark is a hard limit on the maximum number of outgoing messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

    If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages.

    sendTimeout: number

    ZMQ_SNDTIMEO

    Sets the timeout for sending messages on the socket. If the value is 0, send() will return a rejected promise immediately if the message cannot be sent. If the value is -1, it will wait asynchronously until the message is sent. For all other values, it will try to send the message for that amount of time before rejecting.

    Methods

    • Sends a single message or a multipart message on the socket. Queues the message immediately if possible, and returns a resolved promise. If the message cannot be queued because the high water mark has been reached, it will wait asynchronously. The promise will be resolved when the message was queued successfully.

      await socket.send("hello world")
      await socket.send(["hello", "world"]) +

      Queueing may fail eventually if the socket has been configured with a sendTimeout.

      A call to send() is guaranteed to return with a resolved promise immediately if the message could be queued directly.

      Only one asynchronously blocking call to send() may be executed simultaneously. If you call send() again on a socket that is in the mute state it will return a rejected promise with an EBUSY error.

      The reason for disallowing multiple send() calls simultaneously is that it could create an implicit queue of unsendable outgoing messages. This would circumvent the socket's sendHighWaterMark. Such an implementation could even exhaust all system memory and cause the Node.js process to abort.

      For most application you should not notice this implementation detail. Only in rare occasions will a call to send() that does not resolve immediately be undesired. Here are some common scenarios:

      • If you wish to send a message, use await send(...). ZeroMQ socket types have been carefully designed to give you the correct blocking behaviour on the chosen socket type in almost all cases:

        • If sending is not possible, it is often better to wait than to continue as if nothing happened. For example, on a Request socket, you can only receive a reply once a message has been sent; so waiting until a message could be queued before continuing with the rest of the program (likely to read from the socket) is required.

        • Certain socket types (such as Router) will always allow queueing messages and await send(...) won't delay any code that comes after. This makes sense for routers, since typically you don't want a single send operation to stop the handling of other incoming or outgoing messages.

      • If you wish to send on an occasionally blocking socket (for example on a Router with the Router.mandatory option set, or on a Dealer) and you're 100% certain that dropping a message is better than blocking, then you can set the sendTimeout option to 0 to effectively force send() to always resolve immediately. Be prepared to catch exceptions if sending a message is not immediately possible.

      • If you wish to send on a socket and messages should be queued before they are dropped, you should implement a simple queue in JavaScript. Such a queue is not provided by this library because most real world applications need to deal with undeliverable messages in more complex ways - for example, they might need to reply with a status message; or first retry delivery a certain number of times before giving up.

      Parameters

      • message: M

        Single message or multipart message to queue for sending.

      • ...options: O

        Any options, if applicable to the socket type (DRAFT only).

      Returns Promise<void>

      Resolved when the message was successfully queued.

    \ No newline at end of file diff --git a/modules.html b/modules.html index 32ec1d18..ac80e9be 100644 --- a/modules.html +++ b/modules.html @@ -1 +1 @@ -zeromq.js
    \ No newline at end of file +zeromq.js
    \ No newline at end of file diff --git a/types/Event.html b/types/Event.html index a2cf3c16..4a75b4cb 100644 --- a/types/Event.html +++ b/types/Event.html @@ -1 +1 @@ -Event | zeromq.js

    Type Alias Event

    Event:
        | EventFor<"accept", EventAddress>
        | EventFor<"accept:error", EventAddress & EventError>
        | EventFor<"bind", EventAddress>
        | EventFor<"bind:error", EventAddress & EventError>
        | EventFor<"connect", EventAddress>
        | EventFor<"connect:delay", EventAddress>
        | EventFor<"connect:retry", EventAddress & EventInterval>
        | EventFor<"close", EventAddress>
        | EventFor<"close:error", EventAddress & EventError>
        | EventFor<"disconnect", EventAddress>
        | EventFor<"end">
        | EventFor<"handshake", EventAddress>
        | EventFor<"handshake:error:protocol", EventAddress & EventError<ProtoError>>
        | EventFor<"handshake:error:auth", EventAddress & EventError<AuthError>>
        | EventFor<"handshake:error:other", EventAddress & EventError>
        | EventFor<"unknown">

    A union type that represents all possible even types and the associated data. Events always have a type property with an EventType value.

    The following socket events can be generated. This list may be different depending on the ZeroMQ version that is used.

    Note that the error event is avoided by design, since this has a special behaviour in Node.js causing an exception to be thrown if it is unhandled.

    Other error names are adjusted to be as close to possible as other networking related event names in Node.js and/or to the corresponding ZeroMQ.js method call. Events (including any errors) that correspond to a specific operation are namespaced with a colon :, e.g. bind:error or connect:retry.

    • accept - ZMQ_EVENT_ACCEPTED The socket has accepted a connection from a remote peer.

    • accept:error - ZMQ_EVENT_ACCEPT_FAILED The socket has rejected a connection from a remote peer.

      The following additional details will be included with this event:

      • error - An error object that describes the specific error that occurred.
    • bind - ZMQ_EVENT_LISTENING The socket was successfully bound to a network interface.

    • bind:error - ZMQ_EVENT_BIND_FAILED The socket could not bind to a given interface.

      The following additional details will be included with this event:

      • error - An error object that describes the specific error that occurred.
    • connect - ZMQ_EVENT_CONNECTED The socket has successfully connected to a remote peer.

    • connect:delay - ZMQ_EVENT_CONNECT_DELAYED A connect request on the socket is pending.

    • connect:retry - ZMQ_EVENT_CONNECT_RETRIED A connection attempt is being handled by reconnect timer. Note that the reconnect interval is recalculated at each retry.

      The following additional details will be included with this event:

      • interval - The current reconnect interval.
    • close - ZMQ_EVENT_CLOSED The socket was closed.

    • close:error - ZMQ_EVENT_CLOSE_FAILED The socket close failed. Note that this event occurs only on IPC transports..

      The following additional details will be included with this event:

      • error - An error object that describes the specific error that occurred.
    • disconnect - ZMQ_EVENT_DISCONNECTED The socket was disconnected unexpectedly.

    • handshake - ZMQ_EVENT_HANDSHAKE_SUCCEEDED The ZMTP security mechanism handshake succeeded. NOTE: This event may still be in DRAFT statea and not yet available in stable releases.

    • handshake:error:protocol - ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL The ZMTP security mechanism handshake failed due to some mechanism protocol error, either between the ZMTP mechanism peers, or between the mechanism server and the ZAP handler. This indicates a configuration or implementation error in either peer resp. the ZAP handler. NOTE: This event may still be in DRAFT state and not yet available in stable releases.

    • handshake:error:auth - ZMQ_EVENT_HANDSHAKE_FAILED_AUTH The ZMTP security mechanism handshake failed due to an authentication failure. NOTE: This event may still be in DRAFT state and not yet available in stable releases.

    • handshake:error:other - ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL Unspecified error during handshake. NOTE: This event may still be in DRAFT state and not yet available in stable releases.

    • end - ZMQ_EVENT_MONITOR_STOPPED Monitoring on this socket ended.

    • unknown An event was generated by ZeroMQ that the Node.js library could not interpret. Please submit a pull request for new event types if they are not yet included.

    \ No newline at end of file +Event | zeromq.js

    Type Alias Event

    Event:
        | EventFor<"accept", EventAddress>
        | EventFor<"accept:error", EventAddress & EventError>
        | EventFor<"bind", EventAddress>
        | EventFor<"bind:error", EventAddress & EventError>
        | EventFor<"connect", EventAddress>
        | EventFor<"connect:delay", EventAddress>
        | EventFor<"connect:retry", EventAddress & EventInterval>
        | EventFor<"close", EventAddress>
        | EventFor<"close:error", EventAddress & EventError>
        | EventFor<"disconnect", EventAddress>
        | EventFor<"end">
        | EventFor<"handshake", EventAddress>
        | EventFor<
            "handshake:error:protocol",
            EventAddress & EventError<ProtoError>,
        >
        | EventFor<"handshake:error:auth", EventAddress & EventError<AuthError>>
        | EventFor<"handshake:error:other", EventAddress & EventError>
        | EventFor<"unknown">

    A union type that represents all possible even types and the associated data. Events always have a type property with an EventType value.

    The following socket events can be generated. This list may be different depending on the ZeroMQ version that is used.

    Note that the error event is avoided by design, since this has a special behaviour in Node.js causing an exception to be thrown if it is unhandled.

    Other error names are adjusted to be as close to possible as other networking related event names in Node.js and/or to the corresponding ZeroMQ.js method call. Events (including any errors) that correspond to a specific operation are namespaced with a colon :, e.g. bind:error or connect:retry.

    • accept - ZMQ_EVENT_ACCEPTED The socket has accepted a connection from a remote peer.

    • accept:error - ZMQ_EVENT_ACCEPT_FAILED The socket has rejected a connection from a remote peer.

      The following additional details will be included with this event:

      • error - An error object that describes the specific error that occurred.
    • bind - ZMQ_EVENT_LISTENING The socket was successfully bound to a network interface.

    • bind:error - ZMQ_EVENT_BIND_FAILED The socket could not bind to a given interface.

      The following additional details will be included with this event:

      • error - An error object that describes the specific error that occurred.
    • connect - ZMQ_EVENT_CONNECTED The socket has successfully connected to a remote peer.

    • connect:delay - ZMQ_EVENT_CONNECT_DELAYED A connect request on the socket is pending.

    • connect:retry - ZMQ_EVENT_CONNECT_RETRIED A connection attempt is being handled by reconnect timer. Note that the reconnect interval is recalculated at each retry.

      The following additional details will be included with this event:

      • interval - The current reconnect interval.
    • close - ZMQ_EVENT_CLOSED The socket was closed.

    • close:error - ZMQ_EVENT_CLOSE_FAILED The socket close failed. Note that this event occurs only on IPC transports..

      The following additional details will be included with this event:

      • error - An error object that describes the specific error that occurred.
    • disconnect - ZMQ_EVENT_DISCONNECTED The socket was disconnected unexpectedly.

    • handshake - ZMQ_EVENT_HANDSHAKE_SUCCEEDED The ZMTP security mechanism handshake succeeded. NOTE: This event may still be in DRAFT statea and not yet available in stable releases.

    • handshake:error:protocol - ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL The ZMTP security mechanism handshake failed due to some mechanism protocol error, either between the ZMTP mechanism peers, or between the mechanism server and the ZAP handler. This indicates a configuration or implementation error in either peer resp. the ZAP handler. NOTE: This event may still be in DRAFT state and not yet available in stable releases.

    • handshake:error:auth - ZMQ_EVENT_HANDSHAKE_FAILED_AUTH The ZMTP security mechanism handshake failed due to an authentication failure. NOTE: This event may still be in DRAFT state and not yet available in stable releases.

    • handshake:error:other - ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL Unspecified error during handshake. NOTE: This event may still be in DRAFT state and not yet available in stable releases.

    • end - ZMQ_EVENT_MONITOR_STOPPED Monitoring on this socket ended.

    • unknown An event was generated by ZeroMQ that the Node.js library could not interpret. Please submit a pull request for new event types if they are not yet included.

    \ No newline at end of file diff --git a/types/EventOfType.html b/types/EventOfType.html index 0e84ae6b..6a56303a 100644 --- a/types/EventOfType.html +++ b/types/EventOfType.html @@ -1 +1 @@ -EventOfType | zeromq.js

    Type Alias EventOfType<E>

    EventOfType<E>: Expand<Extract<Event, Event & EventFor<E>>>

    Represents the event data object given one particular event type, for example EventOfType<"accept">.

    Type Parameters

    E The specific event type.

    \ No newline at end of file +EventOfType | zeromq.js

    Type Alias EventOfType<E>

    EventOfType: Expand<Extract<Event, Event & EventFor<E>>>

    Represents the event data object given one particular event type, for example EventOfType<"accept">.

    Type Parameters

    E The specific event type.

    \ No newline at end of file diff --git a/types/EventType.html b/types/EventType.html index db3bba47..00b2f94d 100644 --- a/types/EventType.html +++ b/types/EventType.html @@ -1 +1 @@ -EventType | zeromq.js

    Type Alias EventType

    EventType: Event["type"]

    A union type of all available event types. See Event for an overview of the events that can be observed.

    \ No newline at end of file +EventType | zeromq.js

    Type Alias EventType

    EventType: Event["type"]

    A union type of all available event types. See Event for an overview of the events that can be observed.

    \ No newline at end of file diff --git a/types/Message.html b/types/Message.html index 36e8d288..87800f46 100644 --- a/types/Message.html +++ b/types/Message.html @@ -1 +1 @@ -Message | zeromq.js

    Type Alias Message

    Message: Buffer

    A type representing the messages that are returned inside promises by Readable.receive().

    \ No newline at end of file +Message | zeromq.js

    Type Alias Message

    Message: Buffer

    A type representing the messages that are returned inside promises by Readable.receive().

    \ No newline at end of file diff --git a/types/MessageLike.html b/types/MessageLike.html index 833a91a4..e7f24f4f 100644 --- a/types/MessageLike.html +++ b/types/MessageLike.html @@ -1 +1 @@ -MessageLike | zeromq.js

    Type Alias MessageLike

    MessageLike:
        | ArrayBufferView
        | ArrayBuffer
        | SharedArrayBuffer
        | string
        | null

    Union type representing all message types that are accepted by Writable.send().

    \ No newline at end of file +MessageLike | zeromq.js

    Type Alias MessageLike

    MessageLike:
        | ArrayBufferView
        | ArrayBuffer
        | SharedArrayBuffer
        | string
        | number
        | null

    Union type representing all message types that are accepted by Writable.send().

    \ No newline at end of file diff --git a/types/SocketOptions.html b/types/SocketOptions.html index 7a338793..dc5ddc00 100644 --- a/types/SocketOptions.html +++ b/types/SocketOptions.html @@ -1 +1 @@ -SocketOptions | zeromq.js

    Type Alias SocketOptions<S>

    SocketOptions<S>: Options<S, {
        context: Context;
    }>

    Represents the options that can be assigned in the constructor of a given socket type, for example new Dealer({...}). Readonly options for the particular socket will be omitted.

    Type Parameters

    S The socket type to which the options should be applied.

    \ No newline at end of file +SocketOptions | zeromq.js

    Type Alias SocketOptions<S>

    SocketOptions: Options<S, { context: Context }>

    Represents the options that can be assigned in the constructor of a given socket type, for example new Dealer({...}). Readonly options for the particular socket will be omitted.

    Type Parameters

    S The socket type to which the options should be applied.

    \ No newline at end of file diff --git a/variables/capability.html b/variables/capability.html index fecaf9c6..629f4746 100644 --- a/variables/capability.html +++ b/variables/capability.html @@ -1 +1 @@ -capability | zeromq.js

    Variable capabilityConst

    capability: Partial<{
        curve: boolean;
        draft: boolean;
        gssapi: boolean;
        ipc: boolean;
        norm: boolean;
        pgm: boolean;
        tipc: boolean;
    }>

    Exposes some of the optionally available ØMQ capabilities, which may depend on the library version and platform.

    This is an object with keys corresponding to supported ØMQ features and transport protocols. Available capabilities will be set to true. Unavailable capabilities will be absent or set to false.

    Possible keys include:

    • ipc - Support for the ipc:// protocol.
    • pgm - Support for the pgm:// protocol.
    • tipc - Support for the tipc:// protocol.
    • norm - Support for the norm:// protocol.
    • curve - Support for the CURVE security mechanism.
    • gssapi - Support for the GSSAPI security mechanism.
    • draft - Wether the library is built with support for DRAFT sockets.
    \ No newline at end of file +capability | zeromq.js

    Variable capabilityConst

    capability: Partial<
        {
            curve: boolean;
            draft: boolean;
            gssapi: boolean;
            ipc: boolean;
            norm: boolean;
            pgm: boolean;
            tipc: boolean;
        },
    >

    Exposes some of the optionally available ØMQ capabilities, which may depend on the library version and platform.

    This is an object with keys corresponding to supported ØMQ features and transport protocols. Available capabilities will be set to true. Unavailable capabilities will be absent or set to false.

    Possible keys include:

    • ipc - Support for the ipc:// protocol.
    • pgm - Support for the pgm:// protocol.
    • tipc - Support for the tipc:// protocol.
    • norm - Support for the norm:// protocol.
    • curve - Support for the CURVE security mechanism.
    • gssapi - Support for the GSSAPI security mechanism.
    • draft - Wether the library is built with support for DRAFT sockets.
    \ No newline at end of file diff --git a/variables/context-1.html b/variables/context-1.html index 09ec0654..a630ce32 100644 --- a/variables/context-1.html +++ b/variables/context-1.html @@ -1 +1 @@ -context | zeromq.js

    Variable contextConst

    context: Context

    Any socket that has no explicit context passed in during construction will be associated with this context. The default context is exposed in order to be able to change its behaviour with Context options.

    \ No newline at end of file +context | zeromq.js

    Variable contextConst

    context: Context

    Any socket that has no explicit context passed in during construction will be associated with this context. The default context is exposed in order to be able to change its behaviour with Context options.

    \ No newline at end of file diff --git a/variables/version.html b/variables/version.html index 2e4e9fff..a7e8a8f3 100644 --- a/variables/version.html +++ b/variables/version.html @@ -1 +1 @@ -version | zeromq.js

    Variable versionConst

    version: string

    The version of the ØMQ library the bindings were built with. Formatted as (major).(minor).(patch). For example: "4.3.2".

    \ No newline at end of file +version | zeromq.js

    Variable versionConst

    version: string

    The version of the ØMQ library the bindings were built with. Formatted as (major).(minor).(patch). For example: "4.3.2".

    \ No newline at end of file