summaryrefslogtreecommitdiff
path: root/ace/ACE.cpp
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-22 21:33:56 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-22 21:33:56 +0000
commit05d854873e30493c87f9ea7f09476205c8cedb7c (patch)
treecb7ee48ded452c763a673953c7edec9f5ea5e1b4 /ace/ACE.cpp
parentef83ce957e08b8fa537aaf3c58869910ae6fb08d (diff)
downloadATCD-05d854873e30493c87f9ea7f09476205c8cedb7c.tar.gz
ChangeLogTag: Tue Feb 22 13:57:32 2000 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'ace/ACE.cpp')
-rw-r--r--ace/ACE.cpp126
1 files changed, 12 insertions, 114 deletions
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index 171abad7403..c23a0b07856 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -1190,26 +1190,6 @@ ACE::recvfrom (ACE_HANDLE handle,
}
ssize_t
-ACE::recv_n (ACE_HANDLE handle,
- void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE::recv_n_i (handle,
- buf,
- len,
- flags);
- else
- return ACE::recv_n_i (handle,
- buf,
- len,
- flags,
- timeout);
-}
-
-ssize_t
ACE::recv_n_i (ACE_HANDLE handle,
void *buf,
size_t len,
@@ -1301,23 +1281,6 @@ ACE::recv_n_i (ACE_HANDLE handle,
}
ssize_t
-ACE::recv_n (ACE_HANDLE handle,
- void *buf,
- size_t len,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE::recv_n_i (handle,
- buf,
- len);
- else
- return ACE::recv_n_i (handle,
- buf,
- len,
- timeout);
-}
-
-ssize_t
ACE::recv_n_i (ACE_HANDLE handle,
void *buf,
size_t len)
@@ -1470,23 +1433,6 @@ ACE::recvv (ACE_HANDLE handle,
}
ssize_t
-ACE::recvv_n (ACE_HANDLE handle,
- iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE::recvv_n_i (handle,
- iov,
- iovcnt);
- else
- return ACE::recvv_n_i (handle,
- iov,
- iovcnt,
- timeout);
-}
-
-ssize_t
ACE::recvv_n_i (ACE_HANDLE handle,
iovec *iov,
int iovcnt)
@@ -1619,18 +1565,21 @@ ACE::recv_n (ACE_HANDLE handle,
while (current_message_block != 0)
{
+ size_t current_message_block_length =
+ current_message_block->length ();
+
// Check if this block has any space for incoming data.
- if (current_message_block->length () > 0)
+ if (current_message_block_length > 0)
{
// Collect the data in the iovec.
iov[iovcnt].iov_base = current_message_block->rd_ptr ();
- iov[iovcnt].iov_len = current_message_block->length ();
+ iov[iovcnt].iov_len = current_message_block_length;
// Increment iovec counter.
iovcnt++;
// Keep track of the number of bytes for this recv.
- recv_size += current_message_block->length ();
+ recv_size += current_message_block_length;
// The buffer is full make a OS call. @@ TODO find a way to
// find IOV_MAX for platforms that do not define it rather
@@ -1819,26 +1768,6 @@ ACE::sendto (ACE_HANDLE handle,
}
ssize_t
-ACE::send_n (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- int flags,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE::send_n_i (handle,
- buf,
- len,
- flags);
- else
- return ACE::send_n_i (handle,
- buf,
- len,
- flags,
- timeout);
-}
-
-ssize_t
ACE::send_n_i (ACE_HANDLE handle,
const void *buf,
size_t len,
@@ -1930,23 +1859,6 @@ ACE::send_n_i (ACE_HANDLE handle,
}
ssize_t
-ACE::send_n (ACE_HANDLE handle,
- const void *buf,
- size_t len,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE::send_n_i (handle,
- buf,
- len);
- else
- return ACE::send_n_i (handle,
- buf,
- len,
- timeout);
-}
-
-ssize_t
ACE::send_n_i (ACE_HANDLE handle,
const void *buf,
size_t len)
@@ -2098,23 +2010,6 @@ ACE::sendv (ACE_HANDLE handle,
}
ssize_t
-ACE::sendv_n (ACE_HANDLE handle,
- const iovec *iov,
- int iovcnt,
- const ACE_Time_Value *timeout)
-{
- if (timeout == 0)
- return ACE::sendv_n_i (handle,
- iov,
- iovcnt);
- else
- return ACE::sendv_n_i (handle,
- iov,
- iovcnt,
- timeout);
-}
-
-ssize_t
ACE::sendv_n_i (ACE_HANDLE handle,
const iovec *i,
int iovcnt)
@@ -2251,18 +2146,21 @@ ACE::send_n (ACE_HANDLE handle,
while (current_message_block != 0)
{
+ size_t current_message_block_length =
+ current_message_block->length ();
+
// Check if this block has any data to be sent.
- if (current_message_block->length () > 0)
+ if (current_message_block_length > 0)
{
// Collect the data in the iovec.
iov[iovcnt].iov_base = current_message_block->rd_ptr ();
- iov[iovcnt].iov_len = current_message_block->length ();
+ iov[iovcnt].iov_len = current_message_block_length;
// Increment iovec counter.
iovcnt++;
// Keep track of the number of bytes for this send.
- send_size += current_message_block->length ();
+ send_size += current_message_block_length;
// The buffer is full make a OS call. @@ TODO find a way to
// find IOV_MAX for platforms that do not define it rather