ACE.inl File Reference

#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_Thread.h"
#include "ace/OS_NS_ctype.h"
#include "ace/OS_NS_sys_socket.h"

Include dependency graph for ACE.inl:

This graph shows which files directly or indirectly include this file:


Functions

ACE_NAMESPACE_INLINE_FUNCTION
ssize_t 
ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len)
ACE_NAMESPACE_INLINE_FUNCTION
ssize_t 
ACE::recv_i (ACE_HANDLE handle, void *buf, size_t len)
ACE_NAMESPACE_INLINE_FUNCTION int ACE::handle_read_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout)
 Timed wait for handle to get read ready.
ACE_NAMESPACE_INLINE_FUNCTION int ACE::handle_write_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout)
 Timed wait for handle to get write ready.
ACE_NAMESPACE_INLINE_FUNCTION int ACE::handle_exception_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout)
 Timed wait for handle to get exception ready.
ACE_NAMESPACE_INLINE_FUNCTION void ACE::strdelete (char *s)
 Delete the memory allocated by strnew.
ACE_NAMESPACE_INLINE_FUNCTION void ACE::strdelete (wchar_t *s)
ACE_NAMESPACE_INLINE_FUNCTION void ACE::unique_name (const void *object, ACE_TCHAR *name, size_t length)
ACE_NAMESPACE_INLINE_FUNCTION
u_long 
ACE::log2 (u_long num)
 Computes the base 2 logarithm of {num}.
ACE_NAMESPACE_INLINE_FUNCTION
ACE_TCHAR 
ACE::nibble2hex (u_int n)
 Hex conversion utility.
ACE_Export int ACE::map_errno (int error)
ACE_NAMESPACE_INLINE_FUNCTION
u_char 
ACE::hex2byte (ACE_TCHAR c)
 Convert a hex character to its byte representation.
I/O operations
Notes on common parameters:

handle is the connected endpoint that will be used for I/O.

buf is the buffer to write from or receive into.

len is the number of bytes to transfer.

The timeout parameter in the following methods indicates how long to blocking trying to transfer data. If timeout == 0, then the call behaves as a normal send/recv call, i.e., for blocking sockets, the call will block until action is possible; for non-blocking sockets, EWOULDBLOCK will be returned if no action is immediately possible.

If timeout != 0, the call will wait until the relative time specified in *timeout elapses.

The "_n()" I/O methods keep looping until all the data has been transferred. These methods also work for sockets in non-blocking mode i.e., they keep looping on EWOULDBLOCK. timeout is used to make sure we keep making progress, i.e., the same timeout value is used for every I/O operation in the loop and the timeout is not counted down.

The return values for the "*_n()" methods match the return values from the non "_n()" methods and are specified as follows:

  • On complete transfer, the number of bytes transferred is returned.
  • On timeout, -1 is returned, errno == ETIME.
  • On error, -1 is returned, errno is set to appropriate error.
  • On EOF, 0 is returned, errno is irrelevant.

On partial transfers, i.e., if any data is transferred before timeout / error / EOF, bytes_transferred> will contain the number of bytes transferred.

Methods with iovec parameter are I/O vector variants of the I/O operations.

Methods with the extra flags argument will always result in send getting called. Methods without the extra flags argument will result in send getting called on Win32 platforms, and write getting called on non-Win32 platforms.

ACE_NAMESPACE_INLINE_FUNCTION
ssize_t 
ACE::read_n (ACE_HANDLE handle, void *buf, size_t len, size_t *bytes_transferred=0)
ACE_NAMESPACE_INLINE_FUNCTION
ssize_t 
ACE::write_n (ACE_HANDLE handle, const void *buf, size_t len, size_t *bytes_transferred=0)
ACE_NAMESPACE_INLINE_FUNCTION
ssize_t 
ACE::recv_n (ACE_HANDLE handle, void *buf, size_t len, int flags, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0)
ACE_NAMESPACE_INLINE_FUNCTION
ssize_t 
ACE::t_rcv_n (ACE_HANDLE handle, void *buf, size_t len, int *flags, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0)
ACE_NAMESPACE_INLINE_FUNCTION
ssize_t 
ACE::recv_n (ACE_HANDLE handle, void *buf, size_t len, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0)
ACE_NAMESPACE_INLINE_FUNCTION
ssize_t 
ACE::recvv_n (ACE_HANDLE handle, iovec *iov, int iovcnt, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0)
ACE_NAMESPACE_INLINE_FUNCTION
ssize_t 
ACE::send_n (ACE_HANDLE handle, const void *buf, size_t len, int flags, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0)
ACE_NAMESPACE_INLINE_FUNCTION
ssize_t 
ACE::t_snd_n (ACE_HANDLE handle, const void *buf, size_t len, int flags, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0)
ACE_NAMESPACE_INLINE_FUNCTION
ssize_t 
ACE::send_n (ACE_HANDLE handle, const void *buf, size_t len, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0)
ACE_NAMESPACE_INLINE_FUNCTION
ssize_t 
ACE::sendv_n (ACE_HANDLE handle, const iovec *iov, int iovcnt, const ACE_Time_Value *timeout=0, size_t *bytes_transferred=0)

Generated on Wed Apr 23 02:10:13 2008 for ACE by  doxygen 1.5.5