3 //=============================================================================
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)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "ace/INET_Addr.h"
26 #if defined (ACE_HAS_TLI)
28 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
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
40 friend class ACE_TLI_Acceptor
;
41 friend class ACE_TLI_Connector
;
43 /// Default constructor.
46 // = TLI-specific shutdown operations.
47 /// Close down and release resources.
50 /// Send a release and then await the release from the other side.
53 /// Acknowledge the release from the other side and then send the
54 /// release to the other side.
57 /// Return address of remotely connected peer.
58 int get_remote_addr (ACE_Addr
&) const;
61 /// Send an n byte buffer to the connected socket (uses t_snd(3)).
62 ssize_t
send (const void *buf
,
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
,
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
,
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
,
84 const ACE_Time_Value
*timeout
= 0,
85 size_t *bytes_transferred
= 0) const;
88 /// Send an n byte buffer to the connected socket (uses write(2)).
89 ssize_t
send (const void *buf
,
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
,
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
,
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
,
107 const ACE_Time_Value
*timeout
= 0,
108 size_t *bytes_transferred
= 0) const;
111 typedef ACE_INET_Addr PEER_ADDR
;
113 /// Dump the state of an object.
116 /// Declare the dynamic allocation hooks.
117 ACE_ALLOC_HOOK_DECLARE
;
120 /// Indicates whether the tirdwr module should be pushed
124 int get_rwflag () const;
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 */