Class NodeConnection

Hierarchy

  • CreateDestroy
    • NodeConnection

Constructors

Properties

[initLock]: RWLockWriter
certChain: Readonly<X509Certificate>[]
connectionId: string
host: Host
hostname?: Hostname

Hostname is defined if the target's host was resolved from this hostname Undefined if a Host was directly provided

localHost: Host
localPort: Port
logger: Logger
nodeId: NodeId

The most current NodeId of the peer's cert chain

port: Port
quicClient: undefined | QUICClient
quicConnection: QUICConnection
rpcClient: RPCClient<{
    nodesAuthenticateConnection: UnaryCaller<AgentRPCRequestParams<NodesAuthenticateConnectionMessage>, AgentRPCResponseResult<nodes.agent.types.SuccessMessage>>;
    nodesClaimNetworkSign: UnaryCaller<AgentRPCRequestParams<AgentClaimMessage>, AgentRPCResponseResult<AgentClaimMessage>>;
    nodesClaimNetworkVerify: UnaryCaller<AgentRPCRequestParams<AgentClaimMessage>, AgentRPCResponseResult<{
        success: true;
    }>>;
    nodesClaimsGet: ServerCaller<AgentRPCRequestParams<nodes.agent.types.ClaimIdMessage>, AgentRPCResponseResult<AgentClaimMessage>>;
    nodesClosestActiveConnectionsGet: ServerCaller<AgentRPCRequestParams<nodes.agent.types.NodeIdMessage>, AgentRPCResponseResult<ActiveConnectionDataMessage>>;
    nodesClosestLocalNodesGet: ServerCaller<AgentRPCRequestParams<nodes.agent.types.NodeIdMessage>, AgentRPCResponseResult<NodeContactMessage>>;
    nodesConnectionSignalFinal: UnaryCaller<AgentRPCRequestParams<HolePunchRequestMessage>, AgentRPCResponseResult>;
    nodesConnectionSignalInitial: UnaryCaller<AgentRPCRequestParams<HolePunchSignalMessage>, AgentRPCResponseResult<nodes.agent.types.AddressMessage>>;
    nodesCrossSignClaim: DuplexCaller<AgentRPCRequestParams<AgentClaimMessage>, AgentRPCResponseResult<AgentClaimMessage>>;
    notificationsSend: UnaryCaller<AgentRPCRequestParams<SignedNotificationEncoded>, AgentRPCResponseResult>;
    vaultsGitInfoGet: RawCaller;
    vaultsGitPackGet: RawCaller;
    vaultsScan: ServerCaller<AgentRPCRequestParams, AgentRPCResponseResult<nodes.agent.types.VaultsScanMessage>>;
}>

Type declaration

validatedNodeId: NodeId

The NodeId that it was validated on when verifying the peer

Accessors

  • get [destroyed](): boolean
  • Returns boolean

  • get [eventHandled](): ReadonlyWeakSet<Event>
  • Returns ReadonlyWeakSet<Event>

  • get [eventHandlers](): ReadonlyMap<string, Set<EventHandlerInfo>>
  • Returns ReadonlyMap<string, Set<EventHandlerInfo>>

  • get [eventTarget](): EventTarget
  • Returns EventTarget

  • get [handleEventError](): ((evt) => void)
  • Returns ((evt) => void)

      • (evt): void
      • Parameters

        • evt: EventError

        Returns void

  • get [statusP](): Promise<Status>
  • Returns Promise<Status>

  • get [status](): Status
  • Returns Status

Methods

  • Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Parameters

    • __namedParameters: {
          force?: boolean;
      } = {}
      • Optional force?: boolean

    Returns Promise<void>

  • Parameters

    • event: Event

    Returns boolean

  • Propagates all events from the QUICClient or QUICConnection upwards. If the QUICClient exists then it is just registered to that, otherwise just the QUICConnection. Will only re-dispatch the event if it's an AbstractEvent.

    Parameters

    • evt: EventAll<Event>

    Returns void

  • Triggers the destruction of the NodeConnection. Since this is only in response to an underlying problem or close it will force destroy. Dispatched by the EventNodeConnectionError event as the EventNodeConnectionError -> EventNodeConnectionClose event path.

    Parameters

    Returns Promise<void>

  • Dispatches a EventNodeConnectionClose in response to any NodeConnection error event. Will trigger destruction of the NodeConnection via the EventNodeConnectionError -> EventNodeConnectionClose event path.

    Parameters

    Returns void

  • Redispatches a QUICStream from a EventQUICConnectionStream event with a EventNodeConnectionStream event. Should bubble upwards through the NodeConnectionManager.

    Parameters

    • evt: EventQUICConnectionStream

    Returns void

  • Redispatches QUICConnection or QUICClient error events as NodeConnection error events. This should trigger the destruction of the NodeConnection through the EventNodeConnectionError -> EventNodeConnectionClose event path.

    Parameters

    • evt: EventQUICConnectionError

    Returns void

  • Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | EventListenerOptions

    Returns void

Generated using TypeDoc