Crypto++
5.6.4
Free C++ class library of cryptographic schemes
|
1 #ifndef CRYPTOPP_WINPIPES_H
2 #define CRYPTOPP_WINPIPES_H
6 #if !defined(NO_OS_DEPENDENCE) && defined(WINDOWS_PIPES_AVAILABLE)
19 WindowsHandle(HANDLE h = INVALID_HANDLE_VALUE,
bool own=
false);
23 bool GetOwnership()
const {
return m_own;}
24 void SetOwnership(
bool own) {m_own = own;}
26 operator HANDLE()
const {
return m_h;}
27 HANDLE GetHandle()
const {
return m_h;}
28 bool HandleValid()
const;
29 void AttachHandle(HANDLE h,
bool own=
false);
30 HANDLE DetachHandle();
34 virtual void HandleChanged() {}
47 Err(HANDLE h,
const std::string& operation,
int error);
48 HANDLE GetHandle()
const {
return m_h;}
55 virtual HANDLE GetHandle()
const =0;
56 virtual void HandleError(
const char *operation)
const;
57 void CheckAndHandleError(
const char *operation, BOOL result)
const
58 {assert(result==TRUE || result==FALSE);
if (!result) HandleError(operation);}
67 bool MustWaitForResult() {
return true;}
68 bool Receive(
byte* buf,
size_t bufLen);
69 unsigned int GetReceiveResult();
70 bool EofReceived()
const {
return m_eofReceived;}
72 HANDLE GetHandle()
const {
return m_event;}
78 OVERLAPPED m_overlapped;
90 bool MustWaitForResult() {
return true;}
91 void Send(
const byte* buf,
size_t bufLen);
92 unsigned int GetSendResult();
93 bool MustWaitForEof() {
return false; }
96 HANDLE GetHandle()
const {
return m_event;}
102 OVERLAPPED m_overlapped;
103 bool m_resultPending;
122 HANDLE GetHandle()
const {
return WindowsHandle::GetHandle();}
130 WindowsPipeSink(HANDLE h=INVALID_HANDLE_VALUE,
unsigned int maxBufferSize=0,
unsigned int autoFlushBound=16*1024)
137 HANDLE GetHandle()
const {
return WindowsHandle::GetHandle();}
143 #endif // WINDOWS_PIPES_AVAILABLE
The operating system reported an error.
unsigned int GetMaxWaitObjectCount() const
Maximum number of wait objects that this object can return.
bool Receive(byte *buf, size_t bufLen)
receive data from network source, returns whether result is immediately available
void PumpAll()
Pump all data to attached transformation.
void GetWaitObjects(WaitObjectContainer &container, CallStack const &callStack)
Retrieves waitable objects.
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.
unsigned int GetMaxWaitObjectCount() const
Retrieves the maximum number of waitable objects.
unsigned int GetMaxWaitObjectCount() const
Retrieves the maximum number of waitable objects.
Pipe-based implementation of NetworkSender.
Crypto++ library namespace.
Library configuration file.
void GetWaitObjects(WaitObjectContainer &container, CallStack const &callStack)
Retrieves waitable objects.
container of wait objects
Pipe-based implementation of NetworkReceiver.
unsigned int GetMaxWaitObjectCount() const
Maximum number of wait objects that this object can return.
Abstract base classes that provide a uniform interface to this library.