Constructorsconstructor new default ( reconnectDelayOnClose ? ) : default Parameters reconnectDelayOnClose : number = 5000 Propertieson Connection on Connection : OEvent < ( ( conn : default ,
localPublicKey : PublicKey ,
remotePublicKey : PublicKey ,
connectionRoutesGroupName : string ,
initiatedLocally : boolean ) => void ) > = ... on Connection Via Catch All on Connection Via Catch All : OEvent < ( ( conn : default ,
localPublicKey : PublicKey ,
remotePublicKey : PublicKey ,
connectionRoutesGroupName : string ,
initiatedLocally : boolean ) => void ) > = ... on Connections Change on Connections Change : OEvent < ( ( ) => void ) > = ... on Online State Change on Online State Change : OEvent < ( ( state : boolean ) => void ) > = ... Accessorsonline State get onlineState( ) : boolean Returns boolean Methodsadd Incoming Websocket Route Catch All_ Comm Server add Incoming Websocket Route Catch All_ Comm Server ( cryptoApi , commServerUrl ) : { id : string ; isNew : boolean ; } Parameters cryptoApi : CryptoApi commServerUrl : string Returns { id : string ; isNew : boolean ; } add Incoming Websocket Route Catch All_ Direct add Incoming Websocket Route Catch All_ Direct ( cryptoApi , host , port ) : { id : string ; isNew : boolean ; } Parameters cryptoApi : CryptoApi host : string port : number Returns { id : string ; isNew : boolean ; } add Incoming Websocket Route_ Comm Server add Incoming Websocket Route_ Comm Server ( cryptoApi , remotePublicKey , commServerUrl , connectionRoutesGroupName ) : { id : string ; isNew : boolean ; } Parameters cryptoApi : CryptoApi remotePublicKey : PublicKey commServerUrl : string connectionRoutesGroupName : string Returns { id : string ; isNew : boolean ; } add Incoming Websocket Route_ Direct add Incoming Websocket Route_ Direct ( cryptoApi , remotePublicKey , host , port , connectionRoutesGroupName ) : { id : string ; isNew : boolean ; } Parameters cryptoApi : CryptoApi remotePublicKey : PublicKey host : string port : number connectionRoutesGroupName : string Returns { id : string ; isNew : boolean ; } add Outgoing Websocket Route add Outgoing Websocket Route ( cryptoApi , url , connectionRoutesGroupName ) : { id : string ; isNew : boolean ; } Parameters cryptoApi : SymmetricCryptoApiWithKeys url : string connectionRoutesGroupName : string Returns { id : string ; isNew : boolean ; } close Connections close Connections ( localPublicKey ? , remotePublicKey ? , connectionRoutesGroupName ? , catchAll ? ) : void Parameters Optional
localPublicKey : PublicKey Optional
remotePublicKey : PublicKey Optional
connectionRoutesGroupName : string Optional
catchAll : boolean Returns void connection Routes Information debug Dump debug Dump ( header ? ) : void Returns void disable Catch All Routes disable Catch All Routes ( localPublicKey ? , routeId ? ) : Promise < void > Parameters Optional
localPublicKey : PublicKey Optional
routeId : string Returns Promise < void > disable Routes disable Routes ( localPublicKey ? , remotePublicKey ? , connectionRoutesGroupName ? , routeId ? ) : Promise < void > Parameters Optional
localPublicKey : PublicKey Optional
remotePublicKey : PublicKey Optional
connectionRoutesGroupName : string Optional
routeId : string Returns Promise < void > enable Catch All Routes enable Catch All Routes ( localPublicKey ? , routeId ? ) : Promise < void > Parameters Optional
localPublicKey : PublicKey Optional
routeId : string Returns Promise < void > enable Routes enable Routes ( localPublicKey ? , remotePublicKey ? , connectionRoutesGroupName ? , routeId ? ) : Promise < void > Parameters Optional
localPublicKey : PublicKey Optional
remotePublicKey : PublicKey Optional
connectionRoutesGroupName : string Optional
routeId : string Returns Promise < void > is Outgoing Websocket Route Existing is Outgoing Websocket Route Existing ( url , localPublicKey , remotePublicKey , connectionRoutesGroupName ) : boolean Parameters url : string localPublicKey : PublicKey remotePublicKey : PublicKey connectionRoutesGroupName : string Returns boolean Static
append To Connection Statistics Log append To Connection Statistics Log ( connectionRoutesGroup ) : void Returns void
This module manages incoming and outgoing connections.
You can define how a connection between two participants can be reached (called a connection route) and this module will try to open a single connection between those two participants using those routes.
Routes can be enabled / disabled giving the user control of when and how to establish connections.