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