本文整理汇总了C++中HttpReq::getLocalAddrStr方法的典型用法代码示例。如果您正苦于以下问题:C++ HttpReq::getLocalAddrStr方法的具体用法?C++ HttpReq::getLocalAddrStr怎么用?C++ HttpReq::getLocalAddrStr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HttpReq
的用法示例。
在下文中一共展示了HttpReq::getLocalAddrStr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getReqVar
//.........这里部分代码省略.........
case REF_ORG_REQ_URI:
pValue = (char *)pReq->getOrgReqURL();
return pReq->getOrgReqURILen();
case REF_DOCUMENT_URI:
return pReq->getDecodedOrgReqURI( pValue );
case REF_REQ_URI:
pValue = (char *)pReq->getOrgReqURL();
return pReq->getOrgReqURLLen();
case REF_DOC_ROOT:
pValue = (char *)pReq->getDocRoot()->c_str();
return pReq->getDocRoot()->len()-1;
case REF_SERVER_ADMIN:
if ( pReq->getVHost() )
{
const AutoStr2 * pEmail = pReq->getVHost()->getAdminEmails();
pValue = (char *)pEmail->c_str();
return pEmail->len();
}
return 0;
case REF_VH_CNAME:
if ( pReq->getVHost() )
{
pValue = (char *)pReq->getVHost()->getVhName( i );
return i;
}
return 0;
case REF_SERVER_NAME:
pValue = (char *)pReq->getHostStr();
return pReq->getHostStrLen();
case REF_SERVER_ADDR:
pValue = (char *)pReq->getLocalAddrStr()->c_str();
return pReq->getLocalAddrStr()->len();
case REF_SERVER_PORT:
pValue = (char *)pReq->getPortStr().c_str();
return pReq->getPortStr().len();
case REF_SERVER_PROTO:
i = pReq->getVersion();
pValue = (char *)HttpVer::getVersionString( i );
return HttpVer::getVersionStringLen( i );
case REF_SERVER_SOFT:
pValue = (char *)HttpServerVersion::getVersion();
return HttpServerVersion::getVersionLen();
case REF_REQ_LINE:
pValue = (char *)pReq->getOrgReqLine();
return pReq->getOrgReqLineLen();
case REF_IS_SUBREQ:
strcpy( pValue, "false" );
return 5;
case REF_RESP_BYTES:
i = StringTool::str_off_t( pValue, bufLen, pSession->getResp()->getBodySent() );
return i;
//case REF_COOKIE_VAL
//case REF_STRFTIME 155
//case REF_CONN_STATE:
case REF_REQ_TIME_MS:
{
struct timeval tv;
gettimeofday( &tv, NULL );
DateTime::s_curTime = tv.tv_sec;
DateTime::s_curTimeUs = tv.tv_usec;
long lReqTime = (DateTime::s_curTime - pSession->getReqTime())*1000000 +