TcpStreamSettingsWith Method |
Returns a new TcpStreamSettings instance with some settings changed.
Namespace: MongoDB.Driver.Core.ConfigurationAssembly: MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.4.1
Syntax public TcpStreamSettings With(
Optional<AddressFamily> addressFamily = null,
Optional<TimeSpan> connectTimeout = null,
Optional<Nullable<TimeSpan>> readTimeout = null,
Optional<int> receiveBufferSize = null,
Optional<int> sendBufferSize = null,
Optional<Action<Socket>> socketConfigurator = null,
Optional<Nullable<TimeSpan>> writeTimeout = null
)
Public Function With (
Optional addressFamily As Optional(Of AddressFamily) = Nothing,
Optional connectTimeout As Optional(Of TimeSpan) = Nothing,
Optional readTimeout As Optional(Of Nullable(Of TimeSpan)) = Nothing,
Optional receiveBufferSize As Optional(Of Integer) = Nothing,
Optional sendBufferSize As Optional(Of Integer) = Nothing,
Optional socketConfigurator As Optional(Of Action(Of Socket)) = Nothing,
Optional writeTimeout As Optional(Of Nullable(Of TimeSpan)) = Nothing
) As TcpStreamSettings
member With :
?addressFamily : Optional<AddressFamily> *
?connectTimeout : Optional<TimeSpan> *
?readTimeout : Optional<Nullable<TimeSpan>> *
?receiveBufferSize : Optional<int> *
?sendBufferSize : Optional<int> *
?socketConfigurator : Optional<Action<Socket>> *
?writeTimeout : Optional<Nullable<TimeSpan>>
(* Defaults:
let _addressFamily = defaultArg addressFamily null
let _connectTimeout = defaultArg connectTimeout null
let _readTimeout = defaultArg readTimeout null
let _receiveBufferSize = defaultArg receiveBufferSize null
let _sendBufferSize = defaultArg sendBufferSize null
let _socketConfigurator = defaultArg socketConfigurator null
let _writeTimeout = defaultArg writeTimeout null
*)
-> TcpStreamSettings
Parameters
- addressFamily (Optional)
- Type: MongoDB.DriverOptionalAddressFamily
The address family. - connectTimeout (Optional)
- Type: MongoDB.DriverOptionalTimeSpan
The connect timeout. - readTimeout (Optional)
- Type: MongoDB.DriverOptionalNullableTimeSpan
The read timeout. - receiveBufferSize (Optional)
- Type: MongoDB.DriverOptionalInt32
Size of the receive buffer. - sendBufferSize (Optional)
- Type: MongoDB.DriverOptionalInt32
Size of the send buffer. - socketConfigurator (Optional)
- Type: MongoDB.DriverOptionalActionSocket
The socket configurator. - writeTimeout (Optional)
- Type: MongoDB.DriverOptionalNullableTimeSpan
The write timeout.
Return Value
Type:
TcpStreamSettingsA new TcpStreamSettings instance.
See Also