/// <summary> /// Creates a new instance. This class is also used to shareable a context across all instance that are created below one Cluster instance. /// One configuration instance per Cluster instance. /// </summary> internal Configuration(Policies policies, ProtocolOptions protocolOptions, PoolingOptions poolingOptions, SocketOptions socketOptions, ClientOptions clientOptions, IAuthProvider authProvider, IAuthInfoProvider authInfoProvider, QueryOptions queryOptions, IAddressTranslator addressTranslator) { if (addressTranslator == null) { throw new ArgumentNullException("addressTranslator"); } if (queryOptions == null) { throw new ArgumentNullException("queryOptions"); } _policies = policies; _protocolOptions = protocolOptions; _poolingOptions = poolingOptions; _socketOptions = socketOptions; _clientOptions = clientOptions; _authProvider = authProvider; _authInfoProvider = authInfoProvider; _queryOptions = queryOptions; _addressTranslator = addressTranslator; // Create the buffer pool with 16KB for small buffers and 256Kb for large buffers. // The pool does not eagerly reserve the buffers, so it doesn't take unnecessary memory // to create the instance. _bufferPool = new RecyclableMemoryStreamManager(16 * 1024, 256 * 1024, ProtocolOptions.MaximumFrameLength); _timer = new HashedWheelTimer(); }
/// <summary> /// Creates a new instance of TcpSocket using the endpoint and options provided. /// </summary> public TcpSocket(IPEndPoint ipEndPoint, SocketOptions options, SSLOptions sslOptions) { IPEndPoint = ipEndPoint; Options = options; SSLOptions = sslOptions; }
/// <summary> /// Configures the socket options that are going to be used to create the connections to the hosts. /// </summary> public new DseClusterBuilder WithSocketOptions(SocketOptions value) { base.WithSocketOptions(value); return(this); }
/// <summary> /// Configures the socket options that are going to be used to create the connections to the hosts. /// </summary> public Builder WithSocketOptions(SocketOptions value) { _socketOptions = value; return(this); }