Table of Contents

Method With

Namespace
MongoDB.Driver.Core.Configuration
Assembly
MongoDB.Driver.dll

With(Optional<AddressFamily>, Optional<TimeSpan>, Optional<TimeSpan?>, Optional<int>, Optional<int>, Optional<Action<Socket>>, Optional<TimeSpan?>)

Returns a new TcpStreamSettings instance with some settings changed.

public TcpStreamSettings With(Optional<AddressFamily> addressFamily = default, Optional<TimeSpan> connectTimeout = default, Optional<TimeSpan?> readTimeout = default, Optional<int> receiveBufferSize = default, Optional<int> sendBufferSize = default, Optional<Action<Socket>> socketConfigurator = default, Optional<TimeSpan?> writeTimeout = default)

Parameters

addressFamily Optional<AddressFamily>

The address family.

connectTimeout Optional<TimeSpan>

The connect timeout.

readTimeout Optional<TimeSpan?>

The read timeout.

receiveBufferSize Optional<int>

Size of the receive buffer.

sendBufferSize Optional<int>

Size of the send buffer.

socketConfigurator Optional<Action<Socket>>

The socket configurator.

writeTimeout Optional<TimeSpan?>

The write timeout.

Returns

TcpStreamSettings

A new TcpStreamSettings instance.