本文整理汇总了C++中Invocation::octets方法的典型用法代码示例。如果您正苦于以下问题:C++ Invocation::octets方法的具体用法?C++ Invocation::octets怎么用?C++ Invocation::octets使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Invocation
的用法示例。
在下文中一共展示了Invocation::octets方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: strrchr
void
Log::parse_dump_giop_msg_i (void)
{
int sending = ACE_OS::strstr (this->info_,"send") != 0 ? 0 : 1;
int type = ACE_OS::strstr (this->info_,"Request") != 0 ? 0 : 1;
int mode = sending + type * 2;
char *pos = strrchr (this->info_,'[');
long rid = ACE_OS::strtol(pos+1, 0, 10);
PeerProcess *pp = this->thr_->incoming();
if (pp == 0)
{
ACE_ERROR((LM_ERROR,
"%d: dump_msg, could not find pp for incoming, text = %s\n",
this->offset_, this->info_));
return;
}
GIOP_Buffer *target = 0;
switch (mode)
{
case 1: { // receiving request
this->thr_->handle_request();
Invocation *inv = pp->new_invocation (rid, this->thr_);
if (inv == 0)
{
ACE_ERROR ((LM_ERROR,
"%d: process %s already has invocation %d\n",
this->offset_, pp->id(), rid));
break;
}
inv->init (this->line_, this->offset_, this->thr_);
this->thr_->push_invocation (inv);
target = inv->octets(true);
if (target == 0)
{
ACE_ERROR ((LM_ERROR, "%d: no target octets for new recv reqeust, id = %d\n",
this->offset_, rid));
return;
}
break;
}
case 0: // sending request
this->thr_->enter_wait(pp);
this->thr_->push_invocation (0);
// fall through.
case 3: { // receiving reply
Invocation *inv = pp->find_invocation(rid, this->thr_->active_handle());
if (inv == 0)
{
ACE_ERROR ((LM_ERROR,
"%d: could not find existing invocation for req_id %d\n",
this->offset_, rid));
inv = pp->new_invocation (rid,this->thr_);
}
inv->init (this->line_, this->offset_, this->thr_);
target = inv->octets(mode == 0);
if (target == 0 && mode == 3)
{
ACE_ERROR ((LM_ERROR,
"%d: could not map invocation to target for req_id %d\n",
this->offset_, rid));
return;
}
// if (mode == 3)
// this->thr_->exit_wait(pp, this->offset_);
break;
}
case 2: { // sending reply
target = new GIOP_Buffer(this->line_, this->offset_, this->thr_);
this->thr_->pop_invocation ();
break;
}
default:;
}
this->thr_->set_giop_target (target);
if (this->giop_waiters_.size() > 0)
{
Thread *other_thr = 0;
for (ACE_DLList_Iterator<Thread> t_iter(this->giop_waiters_);
!t_iter.done();
t_iter.advance())
{
t_iter.next(other_thr);
GIOP_Buffer *tgt = other_thr->giop_target();
if (target == 0)
{
ACE_ERROR ((LM_ERROR, "%d: dump_giop_msg_i, target is null, mode = %d, reqid = %d\n",
this->offset_, mode, rid));
return;
}
if (tgt != 0 && this->thr_ != other_thr && target->matches (tgt))
{
this->thr_->set_dup (other_thr, true);
}
}
}
this->giop_waiters_.insert_tail(this->thr_);
}