当前位置: 首页>>代码示例>>C++>>正文


C++ LOGT函数代码示例

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


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

示例1: LOGT

//-----------------------------------------------------------------------------
int  ContextSP::_r_send_header()
{
    if(_hdr.bytes()) {
        int err;
        if(_hdr.is_ssl == true) {//used when http proxy is configured in browser
            _sck_ssl_connect = true;
            LOGT("H CONNECT accepted");
            err = _sock.sendall((const u_int8_t*)HTTP_200,  strlen(HTTP_200), SS_TOUT);
        }
        else if(_hdr._nprx != 0){

            _hdr.prep_doc();
            err = _rock.sendall(_hdr.buf(), _hdr.bytes(), SS_TOUT);
            LOGT("H header sent: ["<<_hdr.bytes()
                  <<"][" << _hdr.buf() << "]\n");
        }
        _hdr.clear();
        if(0!=err) {
            _s_send_reply(GENFAILURE);
            _rock.destroy();
            throw Mex((REMOTE_CLOSED_ONSEND),__FILE__,__LINE__);
        }
    }
    if(_working)
        return 1;
    return Context::_r_send_header();
}
开发者ID:comarius,项目名称:buflea,代码行数:28,代码来源:contextsp.cpp

示例2: testThread

void testThread()
{
	char arg1[] = "th1";
	char arg2[] = "th2";

	Thread th1((Thread::Routine)foo, arg1);
	Thread th2((Thread::Routine)foo, arg2);

	th1.setBackground(true);
	th1.start();
	th2.start();

#ifdef _WIN32
	Thread::sleep(500);
	th1.suspend();
	LOGT("th1 was suspended.");

	Thread::sleep(500);
	th2.suspend();
	LOGT("th2 was suspended.");

	Thread::sleep(500);
	th1.resume();
	LOGT("th1 was resumed.");

	Thread::sleep(500);
	th2.resume();
	LOGT("th2 was resumed.");
#endif

	int ret2 = th2.join();

	LOG_VAR(ret2);
}
开发者ID:CltKitakami,项目名称:MyLib,代码行数:34,代码来源:TestThread.cpp

示例3: LOGT

		void IoServiceCore::start()
		{
			_netThread->run();
			LOGT("Create net thread [ %s ]", _netThread->getThreadId());

			_logicThread->run();
			LOGT("Create main logic thread [ %s ]", _logicThread->getThreadId());
		}
开发者ID:jimmy0313,项目名称:JMEngine,代码行数:8,代码来源:JME_Core.cpp

示例4: run

	void run()
	{
		LOGT("hello");
		while (this->getExit() == false)
		{
			LOGT("hello");
			Thread::sleep(1000);
		}
	}
开发者ID:CltKitakami,项目名称:MyLib,代码行数:9,代码来源:TestTimer.cpp

示例5: while

void Server::start() {
    while (!abortableWaitForConnection(socket, pipe[0])) {
        pool.execute(socket.accept());
    }

    LOGT("Closed server main loop.");
    LOGT("Closing worker pool...");
    pool.stop();
}
开发者ID:pkubik,项目名称:tin,代码行数:9,代码来源:HttpServer.cpp

示例6: LOGI

void server::handle_accept(const boost::system::error_code& e) {
	if (!e) {
		// handle connection
		LOGI("new connection, id="<<new_connection_->connection_id());
		LOGT("Handle new connection ...");
		LOGT("connection reference count: "<<new_connection_.use_count());
		new_connection_->start();
		LOGT("connection reference count after start: "<<new_connection_.use_count());
	}

	// accept again
	start_accept();
}
开发者ID:Xiaobin0860,项目名称:Demos,代码行数:13,代码来源:server.cpp

示例7: assert

int  ContextSP::_parse_header()
{
    if(_pending_hdr()==0)
        return 0;

    assert(!_sck_ssl_connect);
    //const bool con = _rock.check_connection();
    if(_hdr._nhost)
    {
        char        host[512]= {0};
        char        port[4] = "80";

        ::strcpy(host, _hdr.get_host().c_str());
        LOGT("H C: hdr ["<<_hdr.bytes()
              << "][" << _hdr.buf() << "]\n to: " << host);

        char* pp = strchr(host,':');
        if(pp) {
            *pp++=0;
        } else {
            pp = port;
        }

        _raddr.port = ::atoi(pp);
        _raddr.ip   = sock::dnsgetip(host);
        if(_raddr.ip.ipv4==0){
            throw Mex(CANNOT_CONNECT,__FILE__,__LINE__);
        }
        if(_working )
        {
            if(_rip == _raddr){
                LOGT("H sending hdr to:"<< IP2STR(_rip.ip) << ":" << _rip.port);
                return _r_send_header();
            } // else rip!=ap
            return _overwrite_connection(_raddr);
        }
        assert(!_rock.isopen());

        if(_check_acl())
        {
            return 0;
        }
        _rock.raw_sethost(_raddr.ip, htons(_raddr.port));
        _rip     = _raddr;
        return _rock_connect();
    }
    if(_working)
        return _r_send_header();

    throw Mex(CANNOT_PARSE_HTTP,__FILE__,__LINE__);
}
开发者ID:comarius,项目名称:buflea,代码行数:51,代码来源:contextsp.cpp

示例8: LOGT

void server::start_accept() {
	//>= 2^ 62
	++connection_id_;
	if ((connection_id_ >= 4611686018427387904) || (connection_id_ <= 0)) {
		connection_id_ = 1;
	}
	LOGT("start_accept, connection_id="<<connection_id_);
	//前一个connection不会释放吗?为什么? connection.start... 通过shared_from_this引用?
	LOGT("connection reference count: "<<new_connection_.use_count());
	new_connection_.reset(new connection(io_service_pool_.get_io_service(), connection_id_));
	LOGT("connection reference count: "<<new_connection_.use_count());
	acceptor_.async_accept(new_connection_->socket(),
			boost::bind(&server::handle_accept, this, boost::asio::placeholders::error));
}
开发者ID:Xiaobin0860,项目名称:Demos,代码行数:14,代码来源:server.cpp

示例9: handle

	virtual void handle(int v)
	{
		if (v > 100)
			LOGT("T1 work");
		else
			handleNext(v);
	}
开发者ID:CltKitakami,项目名称:MyLib,代码行数:7,代码来源:TestMessageHandler.cpp

示例10: OSPD_SubscribeResult

/****************************************************************************************************
 * @fn      OSPD_SubscribeResult
 *          Enables subscription for results
 *
 ***************************************************************************************************/
osp_status_t OSPD_SubscribeResult(uint32_t sensorType, OSPD_ResultDataCallback_t dataReadyCallback ) {
    osp_status_t result = OSP_STATUS_OK;

    LOGT("%s\r\n", __FUNCTION__);

    return result;
}
开发者ID:crankycoder,项目名称:open-sensor-platform,代码行数:12,代码来源:osp_remoteprocedurecalls_stub.cpp

示例11: OSPD_GetVersion

/****************************************************************************************************
 * @fn      OSPD_GetVersion
 *          Helper routine for getting daemon version information
 *
 ***************************************************************************************************/
osp_status_t OSPD_GetVersion(char* versionString, int bufSize) {
    osp_status_t result = OSP_STATUS_OK;

    LOGT("%s\r\n", __FUNCTION__);

    return result;
}
开发者ID:crankycoder,项目名称:open-sensor-platform,代码行数:12,代码来源:osp_remoteprocedurecalls_stub.cpp

示例12: OSPD_Deinitialize

/****************************************************************************************************
 * @fn      OSPD_Deinitialize
 *          Tear down RPC interface function
 *
 ***************************************************************************************************/
osp_status_t OSPD_Deinitialize(void) {
    osp_status_t result = OSP_STATUS_OK;

    LOGT("%s\r\n", __FUNCTION__);

    return result;
}
开发者ID:crankycoder,项目名称:open-sensor-platform,代码行数:12,代码来源:osp_remoteprocedurecalls_stub.cpp

示例13: OSPD_UnsubscribeResult

/****************************************************************************************************
 * @fn      OSPD_UnsubscribeResult
 *          Unsubscribe from sensor results
 *
 ***************************************************************************************************/
osp_status_t OSPD_UnsubscribeResult(uint32_t sensorType) {
    osp_status_t result = OSP_STATUS_OK;

    LOGT("%s\r\n", __FUNCTION__);

    return result;
}
开发者ID:crankycoder,项目名称:open-sensor-platform,代码行数:12,代码来源:osp_remoteprocedurecalls_stub.cpp

示例14: testTimerHandler

void testTimerHandler()
{
	LOGT("<testTimerHandler>");

	Timer t1, t2;
	TimerHandler handler;
	handler.attach(t1, timeout1);
	handler.attach(t2, timeout2);

	t1.setInterval(1);
	t2.setInterval(2);

	sw1.start();
	sw2.start();

	t1.start();
	t2.start();

	Thread::sleep(15);
	handler.detach(t2);
	Thread::sleep(30);

	t1.stop();
	t2.stop();

	Thread::sleep(105);
}
开发者ID:CltKitakami,项目名称:MyLib,代码行数:27,代码来源:TestTimer.cpp

示例15: LOGT

void NetManager::event_onSessionDisconnect(TcpSessionPtr session)
{
	LOGT("NetManager::event_onSessionDisconnect. SessionID=" << session->getSessionID() << ", remoteIP=" << session->getRemoteIP() << ", remotePort=" << session->getRemotePort());

	if (isConnectID(session->getSessionID()))
	{
	}
	else
	{
		if (session->getUserParam() == SS_LOGINED)
		{
			auto info = UserManager::getRef().getInnerUserInfoBySID(session->getSessionID());
			if (info)
			{
				UserManager::getRef().userLogout(info);
				info->sID = InvalidSeesionID;
			}
		}

	}

	if (UserManager::getRef().getAllOnlineUserCount() == 0 && _onSafeClosed)
	{
		SessionManager::getRef().post(_onSafeClosed);
		_onSafeClosed = nullptr;
	}
}
开发者ID:heber,项目名称:breeze,代码行数:27,代码来源:netManager.cpp


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