summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.inl
blob: db0e235abbd6240c9065424d87932608075a5cd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// -*- C++ -*-
//
// $Id$

#include "ace/Null_Mutex.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

ACE_INLINE TAO_EC_Servant_Var<TAO_ECG_UDP_Sender>
TAO_ECG_UDP_Sender::create (CORBA::Boolean crc)
{
  TAO_EC_Servant_Var<TAO_ECG_UDP_Sender> s;
  ACE_NEW_RETURN (s,
                  TAO_ECG_UDP_Sender (crc),
                  s);
  return s;
}

ACE_INLINE
TAO_ECG_UDP_Sender::TAO_ECG_UDP_Sender (CORBA::Boolean crc)
  : supplier_proxy_ ()
  , lcl_ec_ ()
  , addr_server_ ()
  , cdr_sender_ (crc)
  , auto_proxy_disconnect_ ()
{
}

ACE_INLINE CORBA::ULong
TAO_ECG_UDP_Sender::mtu (void) const
{
  return this->cdr_sender_.mtu ();
}

ACE_INLINE int
TAO_ECG_UDP_Sender::mtu (CORBA::ULong new_mtu)
{
  return this->cdr_sender_.mtu (new_mtu);
}

ACE_INLINE int
TAO_ECG_UDP_Sender::get_local_addr (ACE_INET_Addr& addr)
{
  return this->cdr_sender_.get_local_addr (addr);
}
//***************************************************************************

ACE_INLINE
TAO_ECG_UDP_Sender_Disconnect_Command::
TAO_ECG_UDP_Sender_Disconnect_Command (void)
  : proxy_ ()
{
}

ACE_INLINE
TAO_ECG_UDP_Sender_Disconnect_Command::
TAO_ECG_UDP_Sender_Disconnect_Command (
                          RtecEventChannelAdmin::ProxyPushSupplier_ptr proxy)
  : proxy_ (RtecEventChannelAdmin::ProxyPushSupplier::_duplicate (proxy))
{
}

ACE_INLINE
TAO_ECG_UDP_Sender_Disconnect_Command::
TAO_ECG_UDP_Sender_Disconnect_Command (
                              const TAO_ECG_UDP_Sender_Disconnect_Command & rhs)
  : proxy_ (RtecEventChannelAdmin::ProxyPushSupplier::_duplicate
            (rhs.proxy_.in ()))
{
}

ACE_INLINE TAO_ECG_UDP_Sender_Disconnect_Command &
TAO_ECG_UDP_Sender_Disconnect_Command::operator= (
                             const TAO_ECG_UDP_Sender_Disconnect_Command & rhs)
{
  this->proxy_ =
    RtecEventChannelAdmin::ProxyPushSupplier::_duplicate (rhs.proxy_.in ());

  return *this;
}

ACE_INLINE void
TAO_ECG_UDP_Sender_Disconnect_Command::execute (void)
{
  if (CORBA::is_nil (this->proxy_.in ()))
    // We are not connected.
    return;

  RtecEventChannelAdmin::ProxyPushSupplier_var release_proxy =
    this->proxy_._retn ();

  release_proxy->disconnect_push_supplier ();
}

TAO_END_VERSIONED_NAMESPACE_DECL