00001
00002
00003 #include "ace/LSOCK_Dgram.h"
00004 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
00005
00006 #include "ace/Log_Msg.h"
00007
00008 ACE_RCSID(ace, LSOCK_Dgram, "LSOCK_Dgram.cpp,v 4.14 2005/10/28 16:14:52 ossama Exp")
00009
00010 #if !defined (__ACE_INLINE__)
00011 #include "ace/LSOCK_Dgram.inl"
00012 #endif
00013
00014 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00015
00016 ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Dgram)
00017
00018 void
00019 ACE_LSOCK_Dgram::dump (void) const
00020 {
00021 #if defined (ACE_HAS_DUMP)
00022 ACE_TRACE ("ACE_LSOCK_Dgram::dump");
00023
00024 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00025 ACE_SOCK_Dgram::dump ();
00026 ACE_LSOCK::dump ();
00027 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00028 #endif
00029 }
00030
00031
00032
00033 ACE_LSOCK_Dgram::ACE_LSOCK_Dgram (void)
00034 {
00035 ACE_TRACE ("ACE_LSOCK_Dgram::ACE_LSOCK_Dgram");
00036 }
00037
00038
00039
00040 int
00041 ACE_LSOCK_Dgram::open (const ACE_Addr &local,
00042 int protocol_family,
00043 int protocol)
00044 {
00045 ACE_TRACE ("ACE_LSOCK_Dgram::open");
00046 if (ACE_SOCK_Dgram::open (local,
00047 protocol_family,
00048 protocol) == -1)
00049 return -1;
00050 ACE_LSOCK::set_handle (this->ACE_SOCK_Dgram::get_handle ());
00051 return 0;
00052 }
00053
00054
00055
00056 ACE_LSOCK_Dgram::ACE_LSOCK_Dgram (const ACE_Addr &local,
00057 int protocol_family,
00058 int protocol)
00059 {
00060 ACE_TRACE ("ACE_LSOCK_Dgram::ACE_LSOCK_Dgram");
00061 if (this->open (local,
00062 protocol_family,
00063 protocol) == -1)
00064 ACE_ERROR ((LM_ERROR,
00065 ACE_LIB_TEXT ("%p\n"),
00066 ACE_LIB_TEXT ("ACE_LSOCK_Dgram")));
00067 }
00068
00069 ACE_END_VERSIONED_NAMESPACE_DECL
00070
00071 #endif