WebSocketClient client = hub.factory.newWebSocketClient();
String account = internalID.substring(0,internalID.indexOf('@'));
String uriString = internalID.substring(internalID.indexOf('@')+1);
URI uri = new URI(uriString);
CNWSWebSocket socket = new CNWSWebSocket(this);
Future<Connection> f = client.open(uri,socket);
connection = f.get();
connection.sendMessage(account);
}
@Override
protected int getMaxPacketSize() {