diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2010-09-28 11:38:59 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2010-09-28 11:38:59 +0000 |
commit | 99c513d228740018c656ade1c93302cc04351911 (patch) | |
tree | 6f1c230b12220ce80f60aae4ccd0783675777b18 /ACE/ace/MEM_IO.cpp | |
parent | 741ba3b3813e9f0efc150d8a730237fd0991516b (diff) | |
download | ATCD-99c513d228740018c656ade1c93302cc04351911.tar.gz |
Tue Sep 28 11:34:05 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/Asynch_Connector.cpp:
* ace/Barrier.h:
* ace/Barrier.cpp:
* ace/Condition_Thread_Mutex.h:
* ace/Condition_Thread_Mutex.inl:
* ace/Containers_T.cpp:
* ace/Functor.h:
* ace/Functor.inl:
* ace/IO_Cntl_Msg.cpp:
* ace/Intrusive_List.cpp:
* ace/Local_Tokens.inl:
* ace/MEM_IO.cpp:
* ace/MEM_Stream.h:
* ace/MEM_Stream.inl:
* ace/Malloc_T.inl:
* ace/OS_NS_Thread.inl:
* ace/OS_NS_string.inl:
* ace/Object_Manager_Base.cpp:
* ace/POSIX_Proactor.cpp:
* ace/Ping_Socket.cpp:
* ace/Signal.inl:
* ace/Throughput_Stats.h:
* ace/Throughput_Stats.cpp:
* ace/Time_Value.cpp:
* ace/Timer_Hash_T.cpp:
* ace/Timer_Heap_T.cpp:
* ace/Vector_T.h:
* ace/Vector_T.cpp:
* ace/config-linux-common.h:
Removed code that was ifdefed out for years now
Diffstat (limited to 'ACE/ace/MEM_IO.cpp')
-rw-r--r-- | ACE/ace/MEM_IO.cpp | 136 |
1 files changed, 0 insertions, 136 deletions
diff --git a/ACE/ace/MEM_IO.cpp b/ACE/ace/MEM_IO.cpp index 70d9ec217dc..b51b5a53c8c 100644 --- a/ACE/ace/MEM_IO.cpp +++ b/ACE/ace/MEM_IO.cpp @@ -433,142 +433,6 @@ ACE_MEM_IO::send (const ACE_Message_Block *message_block, return 0; } - -#if 0 -ssize_t -ACE_MEM_IO::recvv (iovec *io_vec, - const ACE_Time_Value *timeout) -{ - ACE_TRACE ("ACE_MEM_IO::recvv"); -#if defined (FIONREAD) - ACE_Handle_Set handle_set; - handle_set.reset (); - handle_set.set_bit (this->get_handle ()); - - io_vec->iov_base = 0; - - // Check the status of the current socket. - switch (ACE_OS::select (int (this->get_handle ()) + 1, - handle_set, - 0, 0, - timeout)) - { - case -1: - return -1; - /* NOTREACHED */ - case 0: - errno = ETIME; - return -1; - /* NOTREACHED */ - default: - // Goes fine, fallthrough to get data - break; - } - - int inlen; - - if (ACE_OS::ioctl (this->get_handle (), - FIONREAD, - &inlen) == -1) - return -1; - else if (inlen > 0) - { - ACE_NEW_RETURN (io_vec->iov_base, - char[inlen], - -1); - io_vec->iov_len = this->recv (io_vec->iov_base, - inlen); - return io_vec->iov_len; - } - else - return 0; -#else - ACE_UNUSED_ARG (io_vec); - ACE_UNUSED_ARG (timeout); - ACE_NOTSUP_RETURN (-1); -#endif /* FIONREAD */ -} - -// Send N char *ptrs and int lengths. Note that the char *'s precede -// the ints (basically, an varargs version of writev). The count N is -// the *total* number of trailing arguments, *not* a couple of the -// number of tuple pairs! - -ssize_t -ACE_MEM_IO::send (size_t n, ...) const -{ - ACE_TRACE ("ACE_MEM_IO::send"); - - va_list argp; - size_t total_tuples = n / 2; - iovec *iovp; -#if defined (ACE_HAS_ALLOCA) - iovp = (iovec *) alloca (total_tuples * sizeof (iovec)); -#else - ACE_NEW_RETURN (iovp, - iovec[total_tuples], - -1); -#endif /* !defined (ACE_HAS_ALLOCA) */ - - va_start (argp, n); - - for (size_t i = 0; i < total_tuples; i++) - { - iovp[i].iov_base = va_arg (argp, char *); - iovp[i].iov_len = va_arg (argp, ssize_t); - } - - ssize_t result = ACE_OS::sendv (this->get_handle (), - iovp, - total_tuples); -#if !defined (ACE_HAS_ALLOCA) - delete [] iovp; -#endif /* !defined (ACE_HAS_ALLOCA) */ - va_end (argp); - return result; -} - -// This is basically an interface to ACE_OS::readv, that doesn't use -// the struct iovec_Base explicitly. The ... can be passed as an arbitrary -// number of (char *ptr, int len) tuples. However, the count N is the -// *total* number of trailing arguments, *not* a couple of the number -// of tuple pairs! - -ssize_t -ACE_MEM_IO::recv (size_t n, ...) const -{ - ACE_TRACE ("ACE_MEM_IO::recv"); - - va_list argp; - size_t total_tuples = n / 2; - iovec *iovp; -#if defined (ACE_HAS_ALLOCA) - iovp = (iovec *) alloca (total_tuples * sizeof (iovec)); -#else - ACE_NEW_RETURN (iovp, - iovec[total_tuples], - -1); -#endif /* !defined (ACE_HAS_ALLOCA) */ - - va_start (argp, n); - - for (size_t i = 0; i < total_tuples; i++) - { - iovp[i].iov_base = va_arg (argp, char *); - iovp[i].iov_len = va_arg (argp, ssize_t); - } - - ssize_t result = ACE_OS::recvv (this->get_handle (), - iovp, - total_tuples); -#if !defined (ACE_HAS_ALLOCA) - delete [] iovp; -#endif /* !defined (ACE_HAS_ALLOCA) */ - va_end (argp); - return result; -} -#endif /* 0 */ - ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */ |