Fixed typos
[ACE_TAO.git] / ACE / ace / LSOCK_Dgram.cpp
blob58059aede11a9434962fe906ed42b4ee7a89f0bc
1 #include "ace/LSOCK_Dgram.h"
2 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
4 #include "ace/Log_Category.h"
5 #if defined (ACE_HAS_ALLOC_HOOKS)
6 # include "ace/Malloc_Base.h"
7 #endif /* ACE_HAS_ALLOC_HOOKS */
11 #if !defined (__ACE_INLINE__)
12 #include "ace/LSOCK_Dgram.inl"
13 #endif /* __ACE_INLINE__ */
15 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
17 ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Dgram)
19 void
20 ACE_LSOCK_Dgram::dump (void) const
22 #if defined (ACE_HAS_DUMP)
23 ACE_TRACE ("ACE_LSOCK_Dgram::dump");
25 ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
26 ACE_SOCK_Dgram::dump ();
27 ACE_LSOCK::dump ();
28 ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
29 #endif /* ACE_HAS_DUMP */
32 // The "do nothing" constructor.
34 ACE_LSOCK_Dgram::ACE_LSOCK_Dgram (void)
36 ACE_TRACE ("ACE_LSOCK_Dgram::ACE_LSOCK_Dgram");
39 // Here's the general-purpose open routine.
41 int
42 ACE_LSOCK_Dgram::open (const ACE_Addr &local,
43 int protocol_family,
44 int protocol)
46 ACE_TRACE ("ACE_LSOCK_Dgram::open");
47 if (ACE_SOCK_Dgram::open (local,
48 protocol_family,
49 protocol) == -1)
50 return -1;
51 ACE_LSOCK::set_handle (this->ACE_SOCK_Dgram::get_handle ());
52 return 0;
55 // Create a local ACE_SOCK datagram.
57 ACE_LSOCK_Dgram::ACE_LSOCK_Dgram (const ACE_Addr &local,
58 int protocol_family,
59 int protocol)
61 ACE_TRACE ("ACE_LSOCK_Dgram::ACE_LSOCK_Dgram");
62 if (this->open (local,
63 protocol_family,
64 protocol) == -1)
65 ACELIB_ERROR ((LM_ERROR,
66 ACE_TEXT ("%p\n"),
67 ACE_TEXT ("ACE_LSOCK_Dgram")));
70 ACE_END_VERSIONED_NAMESPACE_DECL
72 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */