public ThriftClient(string host, int port) { if (host == null) throw new ArgumentNullException("host"); _transport = new TSocket(host, port); TProtocol protocol = new TBinaryProtocol(_transport); _client = new ThriftFlumeEventServer.Client(protocol); _transport.Open(); }
/// <summary> /// /// </summary> public Connection(Server server) { Created = DateTime.Now; Server = server; var tsocket = new TSocket(server.Host, server.Port); _transport = new TBufferedTransport(tsocket, 1024); _protocol = new TBinaryProtocol(_transport); _client = new ThriftFlumeEventServer.Client(_protocol); }