Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
console.debug(
`${
sslConfig ? 'Secure' : 'Certificate'
} server started on port ${port}`,
'server',
);
server.emit('listening', port);
resolve(rsServer);
});
return transportServer;
};
rsServer = new RSocketServer({
getRequestHandler: sslConfig
? this._trustedRequestHandler
: this._untrustedRequestHandler,
transport: new RSocketTCPServer({
port: port,
serverFactory: serverFactory,
}),
});
rsServer && rsServer.start();
});
}
console.debug(
`${
sslConfig ? 'Secure' : 'Certificate'
} server started on port ${port}`,
'server',
);
server.emit('listening', port);
resolve(rsServer);
});
return transportServer;
};
rsServer = new RSocketServer({
getRequestHandler: sslConfig
? this._trustedRequestHandler
: this._untrustedRequestHandler,
transport: new RSocketTCPServer({
port: port,
serverFactory: serverFactory,
}),
});
rsServer && rsServer.start();
});
}
function getTransport(protocol: string, options: ServerOptions) {
switch (protocol) {
case 'tcp':
return new RSocketTCPServer({...options});
case 'ws':
default:
return new RSocketWebSocketServer({...options});
}
}
function getServerTransport(protocol: string, options: ServerOptions) {
switch (protocol) {
case 'tcp':
default:
return new RSocketTCPServer({...options});
case 'ws':
return new RSocketWebSocketServer({...options});
}
}