Skip to content

Commit

Permalink
Merge pull request #122 from MatrixAI/feature-configurable-serverName
Browse files Browse the repository at this point in the history
Adding `serverName` option to `CreateQUICClient`
  • Loading branch information
tegefaulkes authored Jul 18, 2024
2 parents 02f2e07 + 4b7029e commit e1dc351
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/QUICClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class QUICClient {
* @param opts
* @param opts.host - target host where wildcards are resolved to point locally.
* @param opts.port - target port
* @param opts.serverName - The expected name of the server you are connecting to, defaults to host.
* @param opts.localHost - defaults to `::` (dual-stack)
* @param opts.localPort - defaults 0
* @param opts.socket - optional shared QUICSocket
Expand All @@ -63,6 +64,7 @@ class QUICClient {
opts: {
host: string;
port: number;
serverName?: string;
localHost?: string;
localPort?: number;
crypto: QUICClientCrypto;
Expand All @@ -80,6 +82,7 @@ class QUICClient {
opts: {
host: string;
port: number;
serverName?: string;
socket: QUICSocket;
crypto: QUICClientCrypto;
config?: QUICClientConfigInput;
Expand All @@ -96,6 +99,7 @@ class QUICClient {
{
host,
port,
serverName,
localHost = '::',
localPort = 0,
socket,
Expand All @@ -110,6 +114,7 @@ class QUICClient {
}: {
host: string;
port: number;
serverName?: string;
localHost?: string;
localPort?: number;
socket?: QUICSocket;
Expand Down Expand Up @@ -186,7 +191,7 @@ class QUICClient {
connection = new QUICConnection({
type: 'client',
scid,
serverName: host,
serverName: serverName ?? host,
socket,
remoteInfo: {
host: host_,
Expand Down

0 comments on commit e1dc351

Please sign in to comment.