logger.info("Connected to " + hostname + ':' + port);
fireEvent(NetworkEvent.NEType.connected);
} catch (IOException ex) {
fireEvent(NetworkEvent.NEType.connectingError);
disconnect(false, quiet, true);
throw new NetworkException("Could not connect to server " + hostname + ':' + port + "! Error=" + ex.getMessage(), ex);
} catch (ClassNotFoundException ex) {
fireEvent(NetworkEvent.NEType.connectingError);
disconnect(false, false, true);
throw new NetworkException("Could not connect to server " + hostname + ':' + port + "! Error=" + ex.getMessage(), ex);
}
}