Esempio n. 1
0
void radomeSyphonClient::initialize(string app, string server) {
#if defined(USE_SYPHON)
   if (!bSetup)
        setup();
    setApplicationName(app);
    setServerName(server);

#elif defined(USE_SPOUT)
	if (receiver) {
		receiver->ReleaseReceiver();
		delete receiver;
		receiver = NULL;
	}
	receiver = new SpoutReceiver();
	setServerName("arena");
	bSetup = false;
	width = 320;
	height = 240;
#endif

}
Esempio n. 2
0
void StatusBar::retranslateUi()
{
  m_secure->setToolTip(tr("Encrypted connection"));
  int state = ChatClient::state();

  if (state == ChatClient::Offline) {
    m_label->setText(tr("No connection"));
    m_icon->setToolTip(tr("No connection"));
  }
  else if (state == ChatClient::Connecting) {
    m_label->setText(ChatClient::io()->url().toString());
  }
  else if (state == ChatClient::Online) {
    setServerName();
    m_icon->setToolTip(tr("Connected"));
  }
  else if (state == ChatClient::Error) {
    setError();
  }
  else if (state == ChatClient::WaitAuth)
    setServerName();
}
Esempio n. 3
0
FClient::FClient()
{
	char buf[PATH_MAX];
	
	/* set the default server name */
	setServerName("localhost");

	/* set the default port number */
	setServerPort(10002);

	/* set the directory to the current working directory */
	getcwd(buf,PATH_MAX);
	setTargetDirectory(buf);
	
}
Esempio n. 4
0
void EditServer::setConnections(){
    QObject::connect(uiServerNameLine, SIGNAL(textChanged(QString)), _server, SLOT(setServerName(QString)));
    QObject::connect(uiServerNameLine, SIGNAL(textChanged(QString)), this, SLOT(updateUI()));

    QObject::connect(uiServerAddressLine, SIGNAL(editingFinished()), this, SLOT(setServerAddress()));
    QObject::connect(uiServerAddressLine, SIGNAL(editingFinished()), this, SLOT(updateUI()));

    QObject::connect(uiUserNameLine, SIGNAL(textChanged(QString)), _server, SLOT(setUserName(QString)));
    QObject::connect(uiUserNameLine, SIGNAL(textChanged(QString)), this, SLOT(updateUI()));

    QObject::connect(uiUserPassLine, SIGNAL(textChanged(QString)), _server, SLOT(setUserPass(QString)));
    QObject::connect(uiUserPassLine, SIGNAL(textChanged(QString)), this, SLOT(updateUI()));

    QObject::connect(uiAddCalendar, SIGNAL(clicked()), this, SLOT(addCalendar()));
    QObject::connect(uiDeleteCalendar, SIGNAL(clicked()), this, SLOT(deleteCalendar()));
}
Esempio n. 5
0
/** Save the ServerConfiguration in the TinyXml document
  *
  * The given ServerConfiguration pointer \b must be valid.
  *
  * \param sc The ServerConfiguration structure pointer
  *
  * \return \c true if the operation successed
  *
  */
bool RainbruRPG::Server::xmlServerConf::save(ServerConfiguration* sc){
  LOGI("Saving server configuration");

  setServerName(sc->getName());
  setDescription(sc->getDesc());
  setTechNote(sc->getTechNote());
  setServerMode(sc->getPlayMode(), sc->getEditMode(), sc->getFloodMode());
  setServerOption(sc->getIpAdress(), sc->getPort(), sc->getFtpPort(),
		  sc->getMaxClient(), sc->getType());

  // Database
  setDatabase(sc->getHostName(), sc->getDatabaseName(), 
	      sc->getUserName(), sc->getPassword() );

  bool success=doc->SaveFile(this->filename.c_str());
  if (!success){
    LOGW("An error occurs during server configuration saved");
  }
  else{
    LOGI("Server configuration correctly saved");
  }
}
Esempio n. 6
0
void HTTPConnector::connectSSL(
  EventBase* eventBase,
  const folly::SocketAddress& connectAddr,
  const shared_ptr<SSLContext>& context,
  SSL_SESSION* session,
  chrono::milliseconds timeoutMs,
  const AsyncSocket::OptionMap& socketOptions,
  const folly::SocketAddress& bindAddr,
  const std::string& serverName) {

  DCHECK(!isBusy());
  transportInfo_ = wangle::TransportInfo();
  transportInfo_.ssl = true;
  auto sslSock = new AsyncSSLSocket(context, eventBase);
  if (session) {
    sslSock->setSSLSession(session, true /* take ownership */);
  }
  sslSock->setServerName(serverName);
  sslSock->forceCacheAddrOnFailure(true);
  socket_.reset(sslSock);
  connectStart_ = getCurrentTime();
  socket_->connect(this, connectAddr, timeoutMs.count(),
                   socketOptions, bindAddr);
}
Esempio n. 7
0
void StatusBar::notify(const Notify &notify)
{
  if (notify.type() == Notify::ServerRenamed)
    setServerName();
}