LSOCK_CODgram.cpp

Go to the documentation of this file.
00001 // LSOCK_CODgram.cpp,v 4.13 2005/10/28 16:14:52 ossama Exp
00002 
00003 #include "ace/LSOCK_CODgram.h"
00004 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
00005 
00006 #include "ace/Log_Msg.h"
00007 
00008 ACE_RCSID(ace, LSOCK_CODgram, "LSOCK_CODgram.cpp,v 4.13 2005/10/28 16:14:52 ossama Exp")
00009 
00010 #if !defined (__ACE_INLINE__)
00011 #include "ace/LSOCK_CODgram.inl"
00012 #endif /* __ACE_INLINE__ */
00013 
00014 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00015 
00016 ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_CODgram)
00017 
00018 void
00019 ACE_LSOCK_CODgram::dump (void) const
00020 {
00021 #if defined (ACE_HAS_DUMP)
00022   ACE_TRACE ("ACE_LSOCK_CODgram::dump");
00023 
00024   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00025   ACE_SOCK_CODgram::dump ();
00026   ACE_LSOCK::dump ();
00027   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00028 #endif /* ACE_HAS_DUMP */
00029 }
00030 
00031 /* Here's the general-purpose open routine. */
00032 
00033 int
00034 ACE_LSOCK_CODgram::open (const ACE_Addr &remote,
00035                          const ACE_Addr &local,
00036                          int protocol_family,
00037                          int protocol)
00038 {
00039   ACE_TRACE ("ACE_LSOCK_CODgram::open");
00040   if (ACE_SOCK_CODgram::open (remote, local, protocol_family,
00041                               protocol) == -1)
00042     return -1;
00043   ACE_LSOCK::set_handle (this->get_handle ());
00044   return 0;
00045 }
00046 
00047 /* Create a local ACE_SOCK datagram. */
00048 
00049 ACE_LSOCK_CODgram::ACE_LSOCK_CODgram (const ACE_Addr &remote,
00050                                       const ACE_Addr &local,
00051                                       int protocol_family,
00052                                       int protocol)
00053 {
00054   ACE_TRACE ("ACE_LSOCK_CODgram::ACE_LSOCK_CODgram");
00055   if (this->open (remote, local, protocol_family,
00056                   protocol) == -1)
00057     ACE_ERROR ((LM_ERROR,  ACE_LIB_TEXT ("%p\n"),  ACE_LIB_TEXT ("ACE_LSOCK_CODgram")));
00058 }
00059 
00060 ACE_END_VERSIONED_NAMESPACE_DECL
00061 
00062 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */

Generated on Thu Nov 9 09:41:53 2006 for ACE by doxygen 1.3.6