Skip to content

Instantly share code, notes, and snippets.

@Justin42
Created August 23, 2012 21:05
Show Gist options
  • Select an option

  • Save Justin42/3441715 to your computer and use it in GitHub Desktop.

Select an option

Save Justin42/3441715 to your computer and use it in GitHub Desktop.
public boolean connectTCP() {
ConnectFuture future = connector.connect(new InetSocketAddress(serverHost, serverPort));
future.awaitUninterruptibly();
if(future.isConnected()) {
session = future.getSession();
return true;
}
else {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment