public boolean connect() throws Exception {
  serverAddress=InetAddress.getByName(serverIP);
  latch=new CountDownLatch(2);
  tcpThread.start();
  udpThread.start();
  return latch.await(10,TimeUnit.SECONDS);
}

public boolean connect ( ) throws Exception { serverAddress = InetAddress . getByName ( serverIP ) ; latch = new CountDownLatch ( 2 ) ; tcpThread . start ( ) ; udpThread . start ( ) ; return latch . await ( 10 , TimeUnit . SECONDS ) ; }
performs an actual connection to the server
