Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / TLI_Stream.h
blobc26823685c33e23f66d124a095e5254ecdf07a63
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file TLI_Stream.h
7 * @author Doug Schmidt
8 */
9 //=============================================================================
12 #ifndef ACE_TLI_STREAM_H
13 #define ACE_TLI_STREAM_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/config-lite.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/TLI.h"
24 #include "ace/INET_Addr.h"
26 #if defined (ACE_HAS_TLI)
28 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 class ACE_Time_Value;
32 /**
33 * @class ACE_TLI_Stream
35 * @brief Defines the member functions for ACE_TLI_Stream abstraction.
37 class ACE_Export ACE_TLI_Stream : public ACE_TLI
39 public:
40 friend class ACE_TLI_Acceptor;
41 friend class ACE_TLI_Connector;
43 /// Default constructor.
44 ACE_TLI_Stream ();
46 // = TLI-specific shutdown operations.
47 /// Close down and release resources.
48 int close ();
50 /// Send a release and then await the release from the other side.
51 int active_close ();
53 /// Acknowledge the release from the other side and then send the
54 /// release to the other side.
55 int passive_close ();
57 /// Return address of remotely connected peer.
58 int get_remote_addr (ACE_Addr &) const;
60 // = timod bindings
61 /// Send an n byte buffer to the connected socket (uses t_snd(3)).
62 ssize_t send (const void *buf,
63 size_t n,
64 int flags,
65 const ACE_Time_Value *timeout = 0) const;
67 /// Recv an n byte buffer from the connected socket (uses t_rcv(3)).
68 ssize_t recv (void *buf,
69 size_t n,
70 int *flags,
71 const ACE_Time_Value *timeout = 0) const;
73 /// Send exactly n bytes to the connected socket (uses t_snd(3)).
74 ssize_t send_n (const void *buf,
75 size_t n,
76 int flags,
77 const ACE_Time_Value *timeout = 0,
78 size_t *bytes_transferred = 0) const;
80 /// Recv exactly n bytes from the connected socket (uses t_rcv(3)).
81 ssize_t recv_n (void *buf,
82 size_t n,
83 int *flags,
84 const ACE_Time_Value *timeout = 0,
85 size_t *bytes_transferred = 0) const;
87 // = tirdwr bindings
88 /// Send an n byte buffer to the connected socket (uses write(2)).
89 ssize_t send (const void *buf,
90 size_t n,
91 const ACE_Time_Value *timeout = 0) const;
93 /// Recv an n byte buffer from the connected socket (uses read(2)).
94 ssize_t recv (void *buf,
95 size_t n,
96 const ACE_Time_Value *timeout = 0) const;
98 /// Send n bytes, keep trying until n are sent (uses write(2)).
99 ssize_t send_n (const void *buf,
100 size_t n,
101 const ACE_Time_Value *timeout = 0,
102 size_t *bytes_transferred = 0) const;
104 /// Recv n bytes, keep trying until n are received (uses read (2)).
105 ssize_t recv_n (void *buf,
106 size_t n,
107 const ACE_Time_Value *timeout = 0,
108 size_t *bytes_transferred = 0) const;
110 // = Meta-type info
111 typedef ACE_INET_Addr PEER_ADDR;
113 /// Dump the state of an object.
114 void dump () const;
116 /// Declare the dynamic allocation hooks.
117 ACE_ALLOC_HOOK_DECLARE;
119 private:
120 /// Indicates whether the tirdwr module should be pushed
121 int rwflag_;
123 /// Get rwflag
124 int get_rwflag () const;
126 /// Set rwflag
127 void set_rwflag (int value);
130 ACE_END_VERSIONED_NAMESPACE_DECL
132 #if defined (__ACE_INLINE__)
133 #include "ace/TLI_Stream.inl"
134 #endif /* __ACE_INLINE__ */
136 #endif /* ACE_HAS_TLI */
137 #include /**/ "ace/post.h"
138 #endif /* ACE_TLI_STREAM_H */