Esempio n. 1
0
 private void connect() throws TException {
   TSocket socket = new TSocket(host, port);
   if (timeout != null) {
     socket.setTimeout(timeout);
   }
   conn = new TFramedTransport(socket);
   client = new DistributedRPC.Client(new TBinaryProtocol(conn));
   conn.open();
 }
 public void setTimeout(int timeout) {
   if (this.timeout != timeout) {
     socket.setTimeout(timeout);
     this.timeout = timeout;
   }
 }