common: support modifying server client opts

This commit is contained in:
Koushik Dutta
2023-11-17 09:46:50 -08:00
parent f7d88273e4
commit fc13a230d7

View File

@@ -13,8 +13,8 @@ export async function listenZero(server: net.Server, hostname?: string) {
return (server.address() as net.AddressInfo).port;
}
export async function listenZeroSingleClient(hostname?: string) {
const server = new net.Server();
export async function listenZeroSingleClient(hostname?: string, options?: net.ServerOpts) {
const server = new net.Server(options);
const port = await listenZero(server, hostname);
let cancel: () => void;