@@ -196,10 +196,40 @@ public TimeSpan? WriteTimeout
196
196
/// <param name="receiveBufferSize">Size of the receive buffer.</param>
197
197
/// <param name="sendBufferSize">Size of the send buffer.</param>
198
198
/// <param name="socketConfigurator">The socket configurator.</param>
199
- /// <param name="socks5ProxySettings">The SOCKS5 proxy settings.</param>
200
199
/// <param name="writeTimeout">The write timeout.</param>
201
200
/// <returns>A new TcpStreamSettings instance.</returns>
202
201
public TcpStreamSettings With (
202
+ Optional < AddressFamily > addressFamily = default ( Optional < AddressFamily > ) ,
203
+ Optional < TimeSpan > connectTimeout = default ( Optional < TimeSpan > ) ,
204
+ Optional < TimeSpan ? > readTimeout = default ( Optional < TimeSpan ? > ) ,
205
+ Optional < int > receiveBufferSize = default ( Optional < int > ) ,
206
+ Optional < int > sendBufferSize = default ( Optional < int > ) ,
207
+ Optional < Action < Socket > > socketConfigurator = default ( Optional < Action < Socket > > ) ,
208
+ Optional < TimeSpan ? > writeTimeout = default ( Optional < TimeSpan ? > ) )
209
+ {
210
+ return new TcpStreamSettings (
211
+ addressFamily : addressFamily . WithDefault ( _addressFamily ) ,
212
+ connectTimeout : connectTimeout . WithDefault ( _connectTimeout ) ,
213
+ readTimeout : readTimeout . WithDefault ( _readTimeout ) ,
214
+ receiveBufferSize : receiveBufferSize . WithDefault ( _receiveBufferSize ) ,
215
+ sendBufferSize : sendBufferSize . WithDefault ( _sendBufferSize ) ,
216
+ socketConfigurator : socketConfigurator . WithDefault ( _socketConfigurator ) ,
217
+ writeTimeout : writeTimeout . WithDefault ( _writeTimeout ) ) ;
218
+ }
219
+
220
+ /// <summary>
221
+ /// Returns a new TcpStreamSettings instance with some settings changed.
222
+ /// </summary>
223
+ /// <param name="addressFamily">The address family.</param>
224
+ /// <param name="connectTimeout">The connect timeout.</param>
225
+ /// <param name="readTimeout">The read timeout.</param>
226
+ /// <param name="receiveBufferSize">Size of the receive buffer.</param>
227
+ /// <param name="sendBufferSize">Size of the send buffer.</param>
228
+ /// <param name="socketConfigurator">The socket configurator.</param>
229
+ /// <param name="socks5ProxySettings">The SOCKS5 proxy settings.</param>
230
+ /// <param name="writeTimeout">The write timeout.</param>
231
+ /// <returns>A new TcpStreamSettings instance.</returns>
232
+ public TcpStreamSettings WithSocks5Settings (
203
233
Optional < AddressFamily > addressFamily = default ( Optional < AddressFamily > ) ,
204
234
Optional < TimeSpan > connectTimeout = default ( Optional < TimeSpan > ) ,
205
235
Optional < TimeSpan ? > readTimeout = default ( Optional < TimeSpan ? > ) ,
0 commit comments