Class TcpStreamSettings
- Namespace
- MongoDB.Driver.Core.Configuration
- Assembly
- MongoDB.Driver.Core.dll
Represents settings for a TCP stream.
public class TcpStreamSettings
- Inheritance
-
TcpStreamSettings
- Inherited Members
Constructors
TcpStreamSettings(Optional<AddressFamily>, Optional<TimeSpan>, Optional<TimeSpan?>, Optional<int>, Optional<int>, Optional<Action<Socket>>, Optional<TimeSpan?>)
Initializes a new instance of the TcpStreamSettings class.
public TcpStreamSettings(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.
Properties
AddressFamily
Gets the address family.
public AddressFamily AddressFamily { get; }
Property Value
- AddressFamily
The address family.
ConnectTimeout
Gets the connect timeout.
public TimeSpan ConnectTimeout { get; }
Property Value
- TimeSpan
The connect timeout.
ReadTimeout
Gets the read timeout.
public TimeSpan? ReadTimeout { get; }
Property Value
- TimeSpan?
The read timeout.
ReceiveBufferSize
Gets the size of the receive buffer.
public int ReceiveBufferSize { get; }
Property Value
- int
The size of the receive buffer.
SendBufferSize
Gets the size of the send buffer.
public int SendBufferSize { get; }
Property Value
- int
The size of the send buffer.
SocketConfigurator
Gets the socket configurator.
public Action<Socket> SocketConfigurator { get; }
Property Value
WriteTimeout
Gets the write timeout.
public TimeSpan? WriteTimeout { get; }
Property Value
- TimeSpan?
The write timeout.
Methods
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.