• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setServer函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setServer函数的典型用法代码示例。如果您正苦于以下问题:C++ setServer函数的具体用法?C++ setServer怎么用?C++ setServer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setServer函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: setServer

bool Camera_INDIClass::Connect(const wxString& camId)
{
    // If not configured open the setup dialog
    if (strcmp(INDICameraName,"INDI Camera")==0) CameraSetup();
    // define server to connect to.
    setServer(INDIhost.mb_str(wxConvUTF8), INDIport);
    // Receive messages only for our camera.
    watchDevice(INDICameraName.mb_str(wxConvUTF8));
    // Connect to server.
    if (connectServer()) {
        return !ready;
    }
    else {
        // last chance to fix the setup
        CameraSetup();
        setServer(INDIhost.mb_str(wxConvUTF8), INDIport);
        watchDevice(INDICameraName.mb_str(wxConvUTF8));
        if (connectServer()) {
            return !ready;
        }
        else {
            return true;
        }
    }
}
开发者ID:xeqtr1982,项目名称:phd2,代码行数:25,代码来源:cam_INDI.cpp


示例2: SetupDialog

bool ScopeINDI::Connect()
{
    // If not configured open the setup dialog
    if (INDIMountName == wxT("INDI Mount")) {
        SetupDialog();
    }
    // define server to connect to.
    setServer(INDIhost.mb_str(wxConvUTF8), INDIport);
    // Receive messages only for our mount.
    watchDevice(INDIMountName.mb_str(wxConvUTF8));
    // Connect to server.
    if (connectServer()) {
        return !ready;
    }
    else {
        // last chance to fix the setup
        SetupDialog();
        setServer(INDIhost.mb_str(wxConvUTF8), INDIport);
        watchDevice(INDIMountName.mb_str(wxConvUTF8));
        if (connectServer()) {
            return !ready;
        }
        else {
            return true;
        }
    }
}
开发者ID:AndresPozo,项目名称:phd2,代码行数:27,代码来源:scope_INDI.cpp


示例3: setDict

bool DictEngine::sourceRequestEvent(const QString &query)
{
    // FIXME: this is COMPLETELY broken .. it can only look up one query at a time!
    //        a DataContainer subclass that does the look up should probably be made
    if (m_currentQuery == query) {
        return false;
    }

    if (m_tcpSocket) {
        m_tcpSocket->abort(); //stop if lookup is in progress and new query is requested
        m_tcpSocket->deleteLater();
        m_tcpSocket = 0;
    }

    QStringList queryParts = query.split(':', QString::SkipEmptyParts);
    if (queryParts.isEmpty()) {
        return false;
    }

    m_currentWord = queryParts.last();
    m_currentQuery = query;

    //asked for a dictionary?
    if (queryParts.count() > 1) {
        setDict(queryParts[queryParts.count()-2]);
        //default to wordnet
    } else {
        setDict(QStringLiteral("wn"));
    }

    //asked for a server?
    if (queryParts.count() > 2) {
        setServer(queryParts[queryParts.count()-3]);
        //default to wordnet
    } else {
        setServer(QStringLiteral("dict.org"));
    }

    if (m_currentWord.simplified().isEmpty()) {
        setData(m_currentWord, m_dictName, QString());
    } else {
        setData(m_currentWord, m_dictName, QString());
        m_tcpSocket = new QTcpSocket(this);
        m_tcpSocket->abort();
        connect(m_tcpSocket, &QTcpSocket::disconnected, this, &DictEngine::socketClosed);

        if (m_currentWord == QLatin1String("list-dictionaries")) {
            connect(m_tcpSocket, &QTcpSocket::readyRead, this, &DictEngine::getDicts);
        } else {
            connect(m_tcpSocket, &QTcpSocket::readyRead, this, &DictEngine::getDefinition);
        }

        m_tcpSocket->connectToHost(m_serverName, 2628);
    }

    return true;
}
开发者ID:cmacq2,项目名称:plasma-workspace,代码行数:57,代码来源:dictengine.cpp


示例4: configTime

void configTime(int timezone, int daylightOffset_sec, const char* server1, const char* server2, const char* server3)
{
    sntp_stop();

    setServer(0, server1);
    setServer(1, server2);
    setServer(2, server3);

    sntp_set_timezone(timezone/3600);
    sntp_set_daylight(daylightOffset_sec);
    sntp_init();
}
开发者ID:Juppit,项目名称:Arduino,代码行数:12,代码来源:time.cpp


示例5: setServerUser

bool Contact::setAddress(const QString &address)
{
    QStringList addressParts = address.split("@");
    if (addressParts.count() == 2) {
        setServerUser(addressParts[0]);
        setServer(addressParts[1]);
    } else {
        setServerUser("");
        setServer("");
    }

}
开发者ID:czeidler,项目名称:fejoa,代码行数:12,代码来源:contact.cpp


示例6: configTime

void WEAK_ATTR configTime(int timezone, int daylightOffset_sec, const char* server1, const char* server2, const char* server3)
{
    sntp_stop();

    setServer(0, server1);
    setServer(1, server2);
    setServer(2, server3);

    s_timezone_sec = timezone;
    s_daylightOffset_sec = daylightOffset_sec;
    sntp_set_timezone(timezone/3600);
    sntp_init();
}
开发者ID:blinkingnoise,项目名称:Sming,代码行数:13,代码来源:time.c


示例7: onClickbtnLogin

/*************************************************
Function Name: onClickbtnLogin()
Description: 单击“登录”按钮
Input: NULL
Output: NULL
Changes: NULL
*************************************************/
void IMLoginWidget::onClickBtnLogin()
{
    setServer();

    m_leUserID->setReadOnly(true);
    m_leUserPwd->setReadOnly(true);

//      m_btnLogin->setEnabled(false);
    if (true == m_isLogin)
    {
        m_isLogin = false;
        m_btnLogin->setText(tr("取消"));

        m_closeTimer = false;
        m_timerID=startTimer(1000);//interval is 100ms

//        IMClientMessageCtrl::sm_hostAddress = address;
//        IMClientMessageCtrl::sm_hostPort = port;

        m_labelStatus->setText(tr("登录中"));

        if (m_loginCtrl == NULL)
        {
            m_loginCtrl = new IMLoginCtrl(this);
            connect(m_loginCtrl, SIGNAL(getLoginMessgae(QString,bool,const UserInformation*)),
                    this, SLOT(setLabelStatus(QString,bool,const UserInformation*)));
        }
开发者ID:liuweilinux,项目名称:Instant-Messaging-Linux,代码行数:34,代码来源:IMLoginWidget.cpp


示例8: setServer

PubSubClient::PubSubClient(const char* domain, uint16_t port, Client& client, Stream& stream) {
    this->_state = MQTT_DISCONNECTED;
    setServer(domain,port);
    setClient(client);
    setStream(stream);
    setListener(NULL);  // TOAST
}
开发者ID:toastedcode,项目名称:pubsubclient,代码行数:7,代码来源:PubSubClient.cpp


示例9: setServer

MqttClient::MqttClient(const char* domain, uint16_t port, MQTT_CALLBACK_SIGNATURE, Nokia_MqttClientAdapter& client) {
    this->_state = MQTT_DISCONNECTED;
    setServer(domain,port);
    setCallback(callback);
    setClient(client);
    this->stream = NULL;
}
开发者ID:lsuciu70,项目名称:arduino,代码行数:7,代码来源:MqttClient.cpp


示例10: setServer

PubSubClient::PubSubClient(const char* domain, uint16_t port, Client& client)
{
	this->_state = MQTT_DISCONNECTED;
	setServer(domain,port);
	setClient(client);
	this->stream = NULL;
}
开发者ID:malimu,项目名称:MySensors,代码行数:7,代码来源:PubSubClient.cpp


示例11: setServer

PubSubClient::PubSubClient(uint8_t *ip, uint16_t port, Client& client, Stream& stream) {
    this->_state = MQTT_DISCONNECTED;
    setServer(ip,port);
    setClient(client);
    setStream(stream);
    setProtocol(MQTT_VERSION);
}
开发者ID:mirkoflchtt,项目名称:pubsubclient,代码行数:7,代码来源:PubSubClient.cpp


示例12: setServer

GameScripting::GameScripting(Server* server)
{
    setServer(server);

    // setEnv(env) is called by ScriptApiEnv::initializeEnvironment()
    // once the environment has been created

    SCRIPTAPI_PRECHECKHEADER

    if (g_settings->getBool("secure.enable_security")) {
        initializeSecurity();
    }

    lua_getglobal(L, "core");
    int top = lua_gettop(L);

    lua_newtable(L);
    lua_setfield(L, -2, "object_refs");

    lua_newtable(L);
    lua_setfield(L, -2, "luaentities");

    // Initialize our lua_api modules
    InitializeModApi(L, top);
    lua_pop(L, 1);

    // Push builtin initialization type
    lua_pushstring(L, "game");
    lua_setglobal(L, "INIT");

    infostream << "SCRIPTAPI: Initialized game modules" << std::endl;
}
开发者ID:ChunHungLiu,项目名称:minetest,代码行数:32,代码来源:scripting_game.cpp


示例13: setServer

PubSubClient::PubSubClient(uint8_t *ip, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client) {
    this->_state = MQTT_DISCONNECTED;
    setServer(ip, port);
    setCallback(callback);
    setClient(client);
    this->stream = NULL;
}
开发者ID:OttoWinter,项目名称:pubsubclient,代码行数:7,代码来源:PubSubClient.cpp


示例14: MyProxy

	MyProxy(ISocketHandler &h)
		: ProxyClient(h)
	{
		setServer("evocraft.net");

		addTimer(NULL, 1.0f, 0);
	}
开发者ID:SourceCodeDude,项目名称:mcproxy,代码行数:7,代码来源:main.cpp


示例15: setServer

GameScripting::GameScripting(Server* server)
{
	setServer(server);

	// setEnv(env) is called by ScriptApiEnv::initializeEnvironment()
	// once the environment has been created

	//TODO add security

	luaL_openlibs(getStack());

	SCRIPTAPI_PRECHECKHEADER

	// Create the main minetest table
	lua_newtable(L);

	lua_newtable(L);
	lua_setfield(L, -2, "object_refs");

	lua_newtable(L);
	lua_setfield(L, -2, "luaentities");

	lua_setglobal(L, "minetest");

	// Initialize our lua_api modules
	lua_getglobal(L, "minetest");
	int top = lua_gettop(L);
	InitializeModApi(L, top);
	lua_pop(L, 1);

	infostream << "SCRIPTAPI: initialized game modules" << std::endl;
}
开发者ID:Nate-Devv,项目名称:freeminer,代码行数:32,代码来源:scripting_game.cpp


示例16: setName

void dlgEditProfile::openMudList ()
{
  const cMUDEntry *e = dlgMudList::getEntry (this);
  if (!e) return;
  setName (e->name);
  setServer (e->host);  // TODO: perhaps add an ability to set IP instead of name ?
  setPort (e->port);
}
开发者ID:FractalBobz,项目名称:kmuddy,代码行数:8,代码来源:dlgeditprofile.cpp



注:本文中的setServer函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setSettings函数代码示例发布时间:2022-05-30
下一篇:
C++ setSerialNumber函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap