/// <summary>
		/// 
		/// </summary>
		private void InitTransportAndClient()
		{
            var socket = new TSocketWithConnectTimeout(Server.Host, Server.Port, Server.Timeout * 1000);

			switch (ConnectionType)
			{
				case ConnectionType.Simple:
					_transport = socket;
					break;

				case ConnectionType.Buffered:
					_transport = new TBufferedTransport(socket, BufferSize);
					break;

				case ConnectionType.Framed:
					_transport = new TFramedTransport(socket);
					break;

				default:
					goto case ConnectionType.Framed;
			}

			var protocol = new TBinaryProtocol(_transport);
			_client = new Cassandra.Client(protocol);
		}
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        private void InitTransportAndClient()
        {
            var socket = new TSocketWithConnectTimeout(Server.Host, Server.Port, Server.Timeout * 1000);

            switch (ConnectionType)
            {
            case ConnectionType.Simple:
                _transport = socket;
                break;

            case ConnectionType.Buffered:
                _transport = new TBufferedTransport(socket, BufferSize);
                break;

            case ConnectionType.Framed:
                _transport = new TFramedTransport(socket);
                break;

            default:
                goto case ConnectionType.Framed;
            }

            var protocol = new TBinaryProtocol(_transport);

            _client = new Cassandra.Client(protocol);
        }