summaryrefslogtreecommitdiff
path: root/ace/SOCK.cpp
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-22 03:00:08 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-22 03:00:08 +0000
commitd7fba4ec70714ccdf7fb29ce85584a71898b7626 (patch)
tree94d56571cfade12aedab53a01e77d3498f6de7f4 /ace/SOCK.cpp
parent89479b1202f3656b2eab09efe64b1e9e8fd4ced9 (diff)
downloadATCD-d7fba4ec70714ccdf7fb29ce85584a71898b7626.tar.gz
This commit was manufactured by cvs2svn to create tag 'TAO-0_1_23'.TAO-0_1_23
Diffstat (limited to 'ace/SOCK.cpp')
-rw-r--r--ace/SOCK.cpp111
1 files changed, 0 insertions, 111 deletions
diff --git a/ace/SOCK.cpp b/ace/SOCK.cpp
deleted file mode 100644
index 7d014c5a0ae..00000000000
--- a/ace/SOCK.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-// SOCK.cpp
-// $Id$
-
-#define ACE_BUILD_DLL
-#include "ace/SOCK.h"
-
-#if defined (ACE_LACKS_INLINE_FUNCTIONS)
-#include "ace/SOCK.i"
-#endif
-
-ACE_ALLOC_HOOK_DEFINE(ACE_SOCK)
-
-void
-ACE_SOCK::dump (void) const
-{
- ACE_TRACE ("ACE_SOCK::dump");
-}
-
-ACE_SOCK::ACE_SOCK (void)
-{
- // ACE_TRACE ("ACE_SOCK::ACE_SOCK");
-}
-
-// Returns information about the remote peer endpoint (if there is
-// one).
-
-int
-ACE_SOCK::get_remote_addr (ACE_Addr &sa) const
-{
- ACE_TRACE ("ACE_SOCK::get_remote_addr");
- int len = sa.get_size ();
- sockaddr *addr = (sockaddr *) sa.get_addr ();
-
- if (ACE_OS::getpeername (this->get_handle (), addr, &len) == -1)
- return -1;
-
- sa.set_size (len);
- return 0;
-}
-
-int
-ACE_SOCK::get_local_addr (ACE_Addr &sa) const
-{
- ACE_TRACE ("ACE_SOCK::get_local_addr");
- int len = sa.get_size ();
- sockaddr *addr = (sockaddr *) sa.get_addr ();
-
- if (ACE_OS::getsockname (this->get_handle (), addr, &len) == -1)
- return -1;
-
- sa.set_size (len);
- return 0;
-}
-
-int
-ACE_SOCK::open (int type,
- int protocol_family,
- int protocol,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK::open");
- int one = 1;
-
- this->set_handle (ACE_OS::socket (protocol_family,
- type,
- protocol));
-
- if (this->get_handle () == ACE_INVALID_HANDLE)
- return -1;
- else if (protocol_family != PF_UNIX &&
- reuse_addr
- && this->set_option (SOL_SOCKET,
- SO_REUSEADDR,
- &one,
- sizeof one) == -1)
- {
- this->close ();
- return -1;
- }
- return 0;
-}
-
-// Close down a ACE_SOCK.
-
-int
-ACE_SOCK::close (void)
-{
- ACE_TRACE ("ACE_SOCK::close");
- int result = 0;
-
- if (this->get_handle () != ACE_INVALID_HANDLE)
- {
- result = ACE_OS::closesocket (this->get_handle ());
- this->set_handle (ACE_INVALID_HANDLE);
- }
- return result;
-}
-
-// General purpose constructor for performing server ACE_SOCK
-// creation.
-
-ACE_SOCK::ACE_SOCK (int type,
- int protocol_family,
- int protocol,
- int reuse_addr)
-{
- ACE_TRACE ("ACE_SOCK::ACE_SOCK");
- if (this->open (type, protocol_family,
- protocol, reuse_addr) == -1)
- ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_SOCK::ACE_SOCK")));
-}