[6916] Fixed typos in spell checking code.
[getmangos.git] / dep / ACE_wrappers / ace / TLI_Stream.h
blob096c7af69ae8b6af1cce87dcede799cd46289a35
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file TLI_Stream.h
7 * $Id: TLI_Stream.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Doug Schmidt
11 //=============================================================================
14 #ifndef ACE_TLI_STREAM_H
15 #define ACE_TLI_STREAM_H
16 #include /**/ "ace/pre.h"
18 #include "ace/config-lite.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "ace/TLI.h"
26 #include "ace/INET_Addr.h"
28 #if defined (ACE_HAS_TLI)
30 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
32 class ACE_Time_Value;
34 /**
35 * @class ACE_TLI_Stream
37 * @brief Defines the member functions for ACE_TLI_Stream abstraction.
39 class ACE_Export ACE_TLI_Stream : public ACE_TLI
41 public:
42 friend class ACE_TLI_Acceptor;
43 friend class ACE_TLI_Connector;
45 // = Initialization and termination methods.
46 /// Default constructor.
47 ACE_TLI_Stream (void);
49 // = TLI-specific shutdown operations.
50 /// Close down and release resources.
51 int close (void);
53 /// Send a release and then await the release from the other side.
54 int active_close (void);
56 /// Acknowledge the release from the other side and then send the
57 /// release to the other side.
58 int passive_close (void);
60 /// Return address of remotely connected peer.
61 int get_remote_addr (ACE_Addr &) const;
63 // = timod bindings
64 /// Send an n byte buffer to the connected socket (uses t_snd(3)).
65 ssize_t send (const void *buf,
66 size_t n,
67 int flags,
68 const ACE_Time_Value *timeout = 0) const;
70 /// Recv an n byte buffer from the connected socket (uses t_rcv(3)).
71 ssize_t recv (void *buf,
72 size_t n,
73 int *flags,
74 const ACE_Time_Value *timeout = 0) const;
76 /// Send exactly n bytes to the connected socket (uses t_snd(3)).
77 ssize_t send_n (const void *buf,
78 size_t n,
79 int flags,
80 const ACE_Time_Value *timeout = 0,
81 size_t *bytes_transferred = 0) const;
83 /// Recv exactly n bytes from the connected socket (uses t_rcv(3)).
84 ssize_t recv_n (void *buf,
85 size_t n,
86 int *flags,
87 const ACE_Time_Value *timeout = 0,
88 size_t *bytes_transferred = 0) const;
90 // = tirdwr bindings
91 /// Send an n byte buffer to the connected socket (uses write(2)).
92 ssize_t send (const void *buf,
93 size_t n,
94 const ACE_Time_Value *timeout = 0) const;
96 /// Recv an n byte buffer from the connected socket (uses read(2)).
97 ssize_t recv (void *buf,
98 size_t n,
99 const ACE_Time_Value *timeout = 0) const;
101 /// Send n bytes, keep trying until n are sent (uses write(2)).
102 ssize_t send_n (const void *buf,
103 size_t n,
104 const ACE_Time_Value *timeout = 0,
105 size_t *bytes_transferred = 0) const;
107 /// Recv n bytes, keep trying until n are received (uses read (2)).
108 ssize_t recv_n (void *buf,
109 size_t n,
110 const ACE_Time_Value *timeout = 0,
111 size_t *bytes_transferred = 0) const;
113 // = Meta-type info
114 typedef ACE_INET_Addr PEER_ADDR;
116 /// Dump the state of an object.
117 void dump (void) const;
119 /// Declare the dynamic allocation hooks.
120 ACE_ALLOC_HOOK_DECLARE;
122 private:
123 /// Indicates whether the tirdwr module should be pushed
124 int rwflag_;
126 /// Get rwflag
127 int get_rwflag (void) const;
129 /// Set rwflag
130 void set_rwflag (int value);
133 ACE_END_VERSIONED_NAMESPACE_DECL
135 #if defined (__ACE_INLINE__)
136 #include "ace/TLI_Stream.inl"
137 #endif /* __ACE_INLINE__ */
139 #endif /* ACE_HAS_TLI */
140 #include /**/ "ace/post.h"
141 #endif /* ACE_TLI_STREAM_H */