Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const createClient = ({
address,
transportClientProvider,
}: {
address: Address;
transportClientProvider: TransportApi.Provider;
}) => {
const { factoryOptions, providerFactory, serializers, setup } = transportClientProvider;
return new RSocketClient({
serializers,
setup: {
dataMimeType: (setup && setup.dataMimeType) || 'text/plain',
keepAlive: (setup && setup.keepAlive) || 1000000,
lifetime: (setup && setup.lifetime) || 1000000,
metadataMimeType: (setup && setup.metadataMimeType) || 'text/plain',
},
transport: providerFactory({ address, factoryOptions }),
});
};