diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-10-21 21:41:34 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-10-21 21:41:34 +0000 |
commit | a5fdebc5f6375078ec1763850a4ca23ec7fe6458 (patch) | |
tree | bcf0a25c3d45a209a6e3ac37b233a4812f29c732 /ace/SOCK_Stream.i | |
download | ATCD-a5fdebc5f6375078ec1763850a4ca23ec7fe6458.tar.gz |
Initial revision
Diffstat (limited to 'ace/SOCK_Stream.i')
-rw-r--r-- | ace/SOCK_Stream.i | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/ace/SOCK_Stream.i b/ace/SOCK_Stream.i new file mode 100644 index 00000000000..cd703bb834c --- /dev/null +++ b/ace/SOCK_Stream.i @@ -0,0 +1,81 @@ +/* -*- C++ -*- */ +// $Id$ + +// SOCK_Stream.i + +#include "ace/SOCK_Stream.h" + +// Shut down just the reading end of a ACE_SOCK. + +inline int +ACE_SOCK_Stream::close_reader (void) +{ + ACE_TRACE ("ACE_SOCK_Stream::close_reader"); + int result = ACE_OS::shutdown (this->get_handle (), 0); + return result; +} + +// Shut down just the writing end of a ACE_SOCK. + +inline int +ACE_SOCK_Stream::close_writer (void) +{ + ACE_TRACE ("ACE_SOCK_Stream::close_writer"); + int result = ACE_OS::shutdown (this->get_handle (), 1); + return result; +} + +// Receive exactly BUF_SIZE bytes from file descriptor this->handle +// into <buf>. Keep trying until this many bytes are received. + +inline ssize_t +ACE_SOCK_Stream::recv_n (void *buf, int buf_size, int flags) const +{ + ACE_TRACE ("ACE_SOCK_Stream::recv_n"); + return ACE::recv_n (this->get_handle (), buf, buf_size, flags); +} + +// Send exactly N bytes from <buf> to <handle>. Keeping trying +// until this many bytes are sent. + +inline ssize_t +ACE_SOCK_Stream::send_n (const void *buf, int buf_size, int flags) const +{ + ACE_TRACE ("ACE_SOCK_Stream::send_n"); + return ACE::send_n (this->get_handle (), buf, buf_size, flags); +} + +// Receive exactly BUF_SIZE bytes from file descriptor +// into BUF. Keep trying until this many bytes are received. + +inline ssize_t +ACE_SOCK_Stream::recv_n (void *buf, int buf_size) const +{ + ACE_TRACE ("ACE_SOCK_Stream::recv_n"); + return ACE::recv_n (this->get_handle (), buf, buf_size); +} + +// Send exactly N bytes from BUF to THIS->SOK_FD. Keeping trying +// until this many bytes are sent. + +inline ssize_t +ACE_SOCK_Stream::send_n (const void *buf, int buf_size) const +{ + ACE_TRACE ("ACE_SOCK_Stream::send_n"); + return ACE::send_n (this->get_handle (), buf, buf_size); +} + +inline ssize_t +ACE_SOCK_Stream::send_urg (void *ptr, int len) +{ + ACE_TRACE ("ACE_SOCK_Stream::send_urg"); + return ACE_OS::send (this->get_handle (), (char *) ptr, len, MSG_OOB); +} + +inline ssize_t +ACE_SOCK_Stream::recv_urg (void *ptr, int len) +{ + ACE_TRACE ("ACE_SOCK_Stream::recv_urg"); + return ACE_OS::recv (this->get_handle (), (char *) ptr, len, MSG_OOB); +} + |