From a5fdebc5f6375078ec1763850a4ca23ec7fe6458 Mon Sep 17 00:00:00 2001 From: levine Date: Mon, 21 Oct 1996 21:41:34 +0000 Subject: Initial revision --- ace/SOCK_Stream.h | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 ace/SOCK_Stream.h (limited to 'ace/SOCK_Stream.h') diff --git a/ace/SOCK_Stream.h b/ace/SOCK_Stream.h new file mode 100644 index 00000000000..3eceece50c2 --- /dev/null +++ b/ace/SOCK_Stream.h @@ -0,0 +1,69 @@ +/* -*- C++ -*- */ +// $Id$ + + +// ============================================================================ +// +// = LIBRARY +// ace +// +// = FILENAME +// SOCK_Stream.h +// +// = AUTHOR +// Doug Schmidt +// +// ============================================================================ + +#if !defined (ACE_SOCK_STREAM_H) +#define ACE_SOCK_STREAM_H + +#include "ace/SOCK_IO.h" +#include "ace/INET_Addr.h" + +class ACE_Export ACE_SOCK_Stream : public ACE_SOCK_IO + // = TITLE + // Defines the methods in the abstraction. + // + // = DESCRIPTION + // This adds additional wrapper methods atop the class. +{ +public: + //= The following two methods use write and read system calls, + //= which are faster than the send and recv library functions + //= used by the following two methods. + ssize_t send_n (const void *buf, int n) const; + // Send n bytes, keep trying until n are sent. + ssize_t recv_n (void *buf, int n) const; + // Recv n bytes, keep trying until n are received. + + // = The following two methods use the send and recv system + // = calls. + ssize_t send_n (const void *buf, int n, int flags) const; + // Send n bytes, keep trying until n are sent. + ssize_t recv_n (void *buf, int n, int flags) const; + // Recv n bytes, keep trying until n are received. + + // = Send/receive an ``urgent'' character (see TCP specs...). + ssize_t send_urg (void *ptr, int len = sizeof (char)); + ssize_t recv_urg (void *ptr, int len = sizeof (char)); + + // = Selectively close endpoints. + int close_reader (void); + // Close down the reader. + int close_writer (void); + // Close down the writer. + + // = Meta-type info + typedef ACE_INET_Addr PEER_ADDR; + + void dump (void) const; + // Dump the state of an object. + + ACE_ALLOC_HOOK_DECLARE; + // Declare the dynamic allocation hooks. +}; + +#include "ace/SOCK_Stream.i" + +#endif /* ACE_SOCK_STREAM_H */ -- cgit v1.2.1