Parameters
- payload: {
apiEndpoint: string | URL;
apiToken: string;
capabilities?: null | ("Retransmission" | "Segmentation" | "RetransmissionAckOnly" | "NoDelay" | "NoRateControl")[];
destination: string;
forwardPath: {
Hops?: number;
};
listenHost?: null | string;
maxClientSessions?: null | number;
maxSurbUpstream?: null | string;
protocol: "udp" | "tcp";
responseBuffer?: null | string;
returnPath: {
Hops?: number;
};
sessionPool?: null | number;
target: {
Plain: string;
} | {
Sealed: number[];
} | {
Service: number;
};
timeout?: number;
}apiEndpoint: string | URL
apiToken: string
Optional capabilities?: null | ("Retransmission" | "Segmentation" | "RetransmissionAckOnly" | "NoDelay" | "NoRateControl")[]
destination: string
forwardPath: {
Hops?: number;
}
Optional listenHost?: null | string
Optional maxClientSessions?: null | number
Optional maxSurbUpstream?: null | string
protocol: "udp" | "tcp"
Optional responseBuffer?: null | string
returnPath: {
Hops?: number;
}
Optional sessionPool?: null | number
target: {
Plain: string;
} | {
Sealed: number[];
} | {
Service: number;
}
Optional timeout?: number
Returns Promise<{
activeClients: string[];
destination: string;
forwardPath: {
Hops?: number;
};
hoprMtu: number;
ip: string;
maxClientSessions: number;
maxSurbUpstream?: null | string;
port: number;
protocol: "udp" | "tcp";
responseBuffer?: null | string;
returnPath: {
Hops?: number;
};
sessionPool?: null | number;
surbLen: number;
target: string;
}>
A Promise that resolves to the opened session payload.
Opens HOPR session with the specified configuration.