int DgramHandler::handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask) { if (peer_.get_handle () != handle ) ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unknown handle %d DgramHandler::handle_close " "with mask %x. My handle is %d\n"), handle, close_mask, peer_.get_handle ())); else peer_.close (); return 0; }
int DSession::open (const ACE_INET_Addr & local, const ACE_INET_Addr & remote) { { ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, monitor, this->lock_, -1); ACE_SOCK_Dgram dgram; if (dgram.open(local) == -1) ACE_ERROR ((LM_ERROR, ACE_TEXT ("(%t) %s=%d open error 1\n"), this->get_name (), this->index ())); else if (this->stream_.open (*this, dgram.get_handle(), 0, // completion key, this->owner_.task().get_proactor(this->index()), 1) == -1) ACE_ERROR((LM_ERROR, ACE_TEXT ("(%t) %s=%d open error 2\n"), this->get_name (), this->index ())); else this->on_open(local, remote); if (this->io_count_r_ != 0 || this->io_count_w_ != 0 || this->post_count_ != 0 ) return 0; } delete this; return -1; }
ACE_HANDLE DgramHandler::get_handle () const { return peer_.get_handle (); }