本文整理汇总了C++中Transport::getUrl方法的典型用法代码示例。如果您正苦于以下问题:C++ Transport::getUrl方法的具体用法?C++ Transport::getUrl怎么用?C++ Transport::getUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transport
的用法示例。
在下文中一共展示了Transport::getUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getRequestUrl
std::string ExecutionContext::getRequestUrl(size_t szLimit) {
Transport* t = getTransport();
std::string ret = t ? t->getUrl() : "";
if (szLimit != std::string::npos) {
ret = ret.substr(0, szLimit);
}
return ret;
}
示例2:
void HPHP::ZendTraceCollector::dump(std::ostream& os)
{
if ( isCollecting() ) {
//-----------------------------------
// Print global information
//-----------------------------------
os << ">>GLOBAL\n";
if ( g_vmContext->getTransport() ) {
Transport* transport = g_vmContext->getTransport();
os << "URL|" << transport->getUrl() << "\n";
os << "SERVER|" << transport->getServerAddr() << ":" << transport->getServerPort() << "\n";
}
os << "<<GLOBAL\n";
//-----------------------------------
// Print callstack
//-----------------------------------
os << ">>CALLSTACK\n";
FrameList_t::const_iterator iter = m_frames.begin();
for(; iter != m_frames.end(); ++iter ) {
os << std::setw(5) << iter->m_level << std::setw(0) << "|";
os << iter->m_func.m_name << iter->m_func.m_args << "|" << iter->m_func.m_filename << "|" << iter->m_func.m_linenumber << "\n";
}
os << "<<CALLSTACK\n";
//-----------------------------------
// Print call statistics
//-----------------------------------
os << ">>CALLS\n";
MapTimes_t::iterator iterCalls = m_timesCalled.begin();
for(; iterCalls != m_timesCalled.end(); ++iterCalls ) {
os << iterCalls->first << "|" << iterCalls->second << "\n";
}
os << "<<CALLS\n";
}
}