1 #ifndef CRYPTOPP_WINPIPES_H 2 #define CRYPTOPP_WINPIPES_H 6 #if !defined(NO_OS_DEPENDENCE) && defined(WINDOWS_PIPES_AVAILABLE) 21 WindowsHandle(HANDLE h = INVALID_HANDLE_VALUE,
bool own=
false);
24 bool GetOwnership()
const {
return m_own;}
25 void SetOwnership(
bool own) {m_own = own;}
27 operator HANDLE()
const {
return m_h;}
28 HANDLE GetHandle()
const {
return m_h;}
29 bool HandleValid()
const;
30 void AttachHandle(HANDLE h,
bool own=
false);
31 HANDLE DetachHandle();
35 virtual void HandleChanged() {}
48 Err(HANDLE h,
const std::string& operation,
int error);
49 HANDLE GetHandle()
const {
return m_h;}
56 virtual HANDLE GetHandle()
const =0;
57 virtual void HandleError(
const char *operation)
const;
58 void CheckAndHandleError(
const char *operation, BOOL result)
const 59 {
if (!result) HandleError(operation);}
68 bool MustWaitForResult() {
return true;}
69 bool Receive(
byte* buf,
size_t bufLen);
70 unsigned int GetReceiveResult();
71 bool EofReceived()
const {
return m_eofReceived;}
73 HANDLE GetHandle()
const {
return m_event;}
79 OVERLAPPED m_overlapped;
91 bool MustWaitForResult() {
return true;}
92 void Send(
const byte* buf,
size_t bufLen);
93 unsigned int GetSendResult();
94 bool MustWaitForEof() {
return false; }
97 HANDLE GetHandle()
const {
return m_event;}
103 OVERLAPPED m_overlapped;
105 bool m_resultPending;
123 HANDLE GetHandle()
const {
return WindowsHandle::GetHandle();}
131 WindowsPipeSink(HANDLE h=INVALID_HANDLE_VALUE,
unsigned int maxBufferSize=0,
unsigned int autoFlushBound=16*1024)
138 HANDLE GetHandle()
const {
return WindowsHandle::GetHandle();}
144 #endif // WINDOWS_PIPES_AVAILABLE
container of wait objects
The operating system reported an error.
void PumpAll()
Pump all data to attached transformation.
Abstract base classes that provide a uniform interface to this library.
Library configuration file.
Pipe-based implementation of NetworkReceiver.
void GetWaitObjects(WaitObjectContainer &container, CallStack const &callStack)
Retrieves waitable objects.
unsigned int GetMaxWaitObjectCount() const
Retrieves the maximum number of waitable objects.
Pipe-based implementation of NetworkSender.
unsigned int GetMaxWaitObjectCount() const
Maximum number of wait objects that this object can return.
void GetWaitObjects(WaitObjectContainer &container, CallStack const &callStack)
Retrieves waitable objects.
Classes for an unlimited queue to store bytes.
void GetWaitObjects(WaitObjectContainer &container, CallStack const &callStack)
Retrieves waitable objects.
bool Receive(byte *buf, size_t bufLen)
receive data from network source, returns whether result is immediately available
unsigned int GetMaxWaitObjectCount() const
Retrieves the maximum number of waitable objects.
void GetWaitObjects(WaitObjectContainer &container, CallStack const &callStack)
Retrieves waitable objects.
Crypto++ library namespace.
unsigned int GetMaxWaitObjectCount() const
Maximum number of wait objects that this object can return.