Example #1
0
        private void InitClient(RpcAgentConfiguration config)
        {
            TTransport transport = config.GetThriftTransport();

            transport.Open();
            TProtocol protocol = config.GetThriftProtcol(transport);

            ThriftWPWithinService.Client client = new ThriftWPWithinService.Client(protocol);

            _transport = transport;
            _client    = client;
            Log.InfoFormat("Client connected to Thrift RPC Agent endpoint at {0}:{1} using {2}", config.ServiceHost,
                           config.ServicePort, config.Protocol);
        }
Example #2
0
        private void Init(string host, int port)
        {
            Log.InfoFormat("Opening TSocket to {0}:{1}", host, port);
            TTransport transport = new TSocket(host, port);

            transport.Open();

            TProtocol protocol = new TBinaryProtocol(transport);

            ThriftWPWithinService.Client client = new ThriftWPWithinService.Client(protocol);

            _transport = transport;
            _client    = client;
            Log.InfoFormat("Client connected to Thrift endpoint at {0}:{1}", host, port);
        }