3 //=============================================================================
9 //=============================================================================
11 #ifndef ACE_ATM_STREAM_H
12 #define ACE_ATM_STREAM_H
13 #include /**/ "ace/pre.h"
15 #include /**/ "ace/config-all.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #if defined (ACE_HAS_ATM)
23 #include "ace/ATM_Addr.h"
24 #include "ace/ATM_Params.h"
26 #if defined (ACE_WIN32)
27 #include "ace/SOCK_Stream.h"
28 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
29 typedef ACE_SOCK_Stream ATM_Stream
;
30 ACE_END_VERSIONED_NAMESPACE_DECL
32 #include "ace/TLI_Stream.h"
33 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
34 typedef ACE_TLI_Stream ATM_Stream
;
35 ACE_END_VERSIONED_NAMESPACE_DECL
38 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
41 * @class ACE_ATM_Stream
43 * @brief Defines the member functions for ACE_ATM_Stream abstraction.
45 class ACE_Export ACE_ATM_Stream
48 /// Default constructor.
49 ACE_ATM_Stream (void);
51 // = ATM-specific open and shutdown operations.
53 int open (ACE_ATM_Params params
= ACE_ATM_Params());
55 /// Close down and release resources.
58 /// Get the underlying handle.
59 ACE_HANDLE
get_handle (void) const;
61 /// Get the underlying stream.
62 ATM_Stream
& get_stream (void);
64 /// Get the name of the connected host.
65 char* get_peer_name (void) const;
67 /// Get the VPI and VCI of the stream.
68 int get_vpi_vci (ACE_UINT16
&vpi
,
69 ACE_UINT16
&vci
) const;
71 /// Recv an n byte buffer from the connected transport mechanism.
72 ssize_t
recv (void *buf
,
74 int *flags
= 0) const;
76 /// Send exactly n bytes to the connected transport mechanism.
77 ssize_t
send_n (const void *buf
,
82 typedef ACE_ATM_Addr PEER_ADDR
;
84 /// Dump the state of an object.
85 void dump (void) const;
87 /// Declare the dynamic allocation hooks.
88 ACE_ALLOC_HOOK_DECLARE
;
91 /// Typedef'd to the appropriate stream mechanism above.
95 ACE_END_VERSIONED_NAMESPACE_DECL
97 #if defined (__ACE_INLINE__)
98 #include "ace/ATM_Stream.inl"
99 #endif /* __ACE_INLINE__ */
101 #endif /* ACE_HAS_ATM */
102 #include /**/ "ace/post.h"
103 #endif /* ACE_ATM_STREAM_H */