本文整理汇总了C++中sipmessage::Ptr::setProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr::setProperty方法的具体用法?C++ Ptr::setProperty怎么用?C++ Ptr::setProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sipmessage::Ptr
的用法示例。
在下文中一共展示了Ptr::setProperty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeMessage
void SIPTransaction::writeMessage(SIPMessage::Ptr pMsg, const OSS::IPAddress& remoteAddress)
{
OSS::mutex_lock lock(_mutex);
if (!_transport)
{
OSS_LOG_ERROR("SIPTransaction::writeMessage does not have a transport to use");
return;
}
if (SIPXOR::isEnabled() && _isXOREncrypted)
{
pMsg->setProperty("xor", "1");
}
if (_fsm->onSendMessage(pMsg))
{
std::ostringstream logMsg;
logMsg << _logId << ">>> " << pMsg->startLine()
<< " LEN: " << pMsg->data().size()
<< " SRC: " << _transport->getLocalAddress().toIpPortString()
<< " DST: " << remoteAddress.toIpPortString()
<< " ENC: " << _isXOREncrypted
<< " PROT: " << _transport->getTransportScheme();
OSS::log_information(logMsg.str());
if (OSS::log_get_level() >= OSS::PRIO_DEBUG)
OSS::log_debug(pMsg->createLoggerData());
_transport->writeMessage(pMsg,
remoteAddress.toString(),
OSS::string_from_number<unsigned short>(remoteAddress.getPort()));
}
}
示例2: dispatchMessage
void EndpointListener::dispatchMessage(const SIPMessage::Ptr& pRequest)
{
if (_dispatch)
{
OSS_LOG_DEBUG(pRequest->createContextId(true) << "EndpointListener::dispatchMessage( " << pRequest->startLine() << " )");
pRequest->setProperty(OSS::PropertyMap::PROP_EndpointName, _endpointName);
pRequest->commitData();
_dispatch(pRequest, _pConnection);
}
else
{
OSS_LOG_ERROR(pRequest->createContextId(true) << "EndpointListener::dispatchMessage( NULL )");
}
}
示例3: lock
void SIPTransaction::sendAckFor2xx(
const SIPMessage::Ptr& pAck,
const OSS::IPAddress& dialogTarget)
{
OSS::mutex_lock lock(_mutex);
if (!_dialogTarget.isValid())
_dialogTarget = dialogTarget;
if (SIPXOR::isEnabled() && _isXOREncrypted)
{
pAck->setProperty("xor", "1");
}
if (_transport->isReliableTransport())
{
writeMessage(pAck);
}
else
{
writeMessage(pAck, dialogTarget);
}
}