diff options
-rw-r--r-- | ace/SOCK_IO.cpp | 4 | ||||
-rw-r--r-- | ace/SOCK_IO.h | 14 | ||||
-rw-r--r-- | ace/SOCK_IO.i | 17 |
3 files changed, 29 insertions, 6 deletions
diff --git a/ace/SOCK_IO.cpp b/ace/SOCK_IO.cpp index bbc23b3c852..942fdd66342 100644 --- a/ace/SOCK_IO.cpp +++ b/ace/SOCK_IO.cpp @@ -25,8 +25,8 @@ ACE_SOCK_IO::dump (void) const // returns the number of bytes read. ssize_t -ACE_SOCK_IO::recv (iovec *io_vec, - const ACE_Time_Value *timeout) +ACE_SOCK_IO::recvv (iovec *io_vec, + const ACE_Time_Value *timeout) { ACE_TRACE ("ACE_SOCK_IO::recvv"); #if defined (FIONREAD) diff --git a/ace/SOCK_IO.h b/ace/SOCK_IO.h index ff4b0e65237..26700cc4064 100644 --- a/ace/SOCK_IO.h +++ b/ace/SOCK_IO.h @@ -59,18 +59,26 @@ public: // Recv an <n> byte buffer from the connected socket (uses // <read(2)>). + ssize_t sendv (const iovec iov[], + size_t n) const; + // Send an <iovec> of size <n> to the connected socket. + ssize_t send (const iovec iov[], size_t n) const; - // Send an <iovec> of size <n> to the connected socket. + // Same as above. Deprecated. - ssize_t recv (iovec *io_vec, - const ACE_Time_Value *timeout = 0); + ssize_t recvv (iovec *io_vec, + const ACE_Time_Value *timeout = 0); // Allows a client to read from a socket without having to provide a // buffer to read. This method determines how much data is in the // socket, allocates a buffer of this size, reads in the data, and // returns the number of bytes read. The caller is responsible for // deleting the member in the <iov_base> field of <io_vec>. + ssize_t recv (iovec *io_vec, + const ACE_Time_Value *timeout = 0); + // Same as above. Deprecated. + ssize_t send (const void *buf, size_t n, int flags, diff --git a/ace/SOCK_IO.i b/ace/SOCK_IO.i index 8fb0122ee49..db41f079cd7 100644 --- a/ace/SOCK_IO.i +++ b/ace/SOCK_IO.i @@ -62,13 +62,28 @@ ACE_SOCK_IO::recv (void *buf, size_t n) const // Send a vector of n byte messages to the connected socket. ASYS_INLINE ssize_t -ACE_SOCK_IO::send (const iovec iov[], size_t n) const +ACE_SOCK_IO::sendv (const iovec iov[], size_t n) const { ACE_TRACE ("ACE_SOCK_IO::sendv"); return ACE_OS::sendv (this->get_handle (), iov, n); } ASYS_INLINE ssize_t +ACE_SOCK_IO::send (const iovec iov[], size_t n) const +{ + ACE_TRACE ("ACE_SOCK_IO::send"); + return this->sendv (iov, n); +} + +ASYS_INLINE ssize_t +ACE_SOCK_IO::recv (iovec *io_vec, + const ACE_Time_Value *timeout) +{ + ACE_TRACE ("ACE_SOCK_IO::recv"); + return this->recvv (io_vec, timeout); +} + +ASYS_INLINE ssize_t ACE_SOCK_IO::send (const void *buf, size_t n, ACE_OVERLAPPED *overlapped) const { |