WindowsPipeSource Class Reference

Windows Pipe Source. More...

#include <winpipes.h>

Inheritance diagram for WindowsPipeSource:

WindowsHandle NetworkSource WindowsPipeReceiver NonblockingSource WindowsPipe NetworkReceiver AutoSignaling< Source > Waitable

List of all members.

Public Member Functions

 WindowsPipeSource (HANDLE h=INVALID_HANDLE_VALUE, bool pumpAll=false, BufferedTransformation *attachment=NULL)
bool GetOwnership () const
void SetOwnership (bool own)
 operator HANDLE ()
bool HandleValid () const
void AttachHandle (HANDLE h, bool own=false)
HANDLE DetachHandle ()
void CloseHandle ()
unsigned int GetMaxWaitObjectCount () const
void GetWaitObjects (WaitObjectContainer &container, CallStack const &callStack)
bool SourceExhausted () const
void SetAutoSignalPropagation (int propagation)
int GetAutoSignalPropagation () const
lword GetMaxBytesPerSecond () const
void SetMaxBytesPerSecond (lword v)
lword ComputeCurrentTransceiveLimit ()
double TimeToNextTransceive ()
void NoteTransceive (lword size)
bool MustWaitForResult ()
bool Receive (byte *buf, size_t bufLen)
 receive data from network source, returns whether result is immediately available
unsigned int GetReceiveResult ()
bool EofReceived () const
unsigned int GetMaxWaitObjectCount () const
 maximum number of wait objects that this object can return
void GetWaitObjects (WaitObjectContainer &container, CallStack const &callStack)
 put wait objects into container
virtual bool MustWaitToReceive ()
bool Wait (unsigned long milliseconds, CallStack const &callStack)
 wait on this object
NONBLOCKING SOURCE
size_t GeneralPump2 (lword &byteCount, bool blockingOutput=true, unsigned long maxTime=INFINITE_TIME, bool checkDelimiter=false, byte delimiter='\n')
 pump up to maxSize bytes using at most maxTime milliseconds
lword GeneralPump (lword maxSize=LWORD_MAX, unsigned long maxTime=INFINITE_TIME, bool checkDelimiter=false, byte delimiter='\n')
lword TimedPump (unsigned long maxTime)
lword PumpLine (byte delimiter='\n', lword maxSize=1024)
size_t Pump2 (lword &byteCount, bool blocking=true)
size_t PumpMessages2 (unsigned int &messageCount, bool blocking=true)

Protected Member Functions

virtual void HandleChanged ()
size_t DoPump (lword &byteCount, bool blockingOutput, unsigned long maxTime, bool checkDelimiter, byte delimiter)
const NetworkReceiverGetReceiver () const
bool BlockedBySpeedLimit () const
virtual void HandleError (const char *operation) const
void CheckAndHandleError (const char *operation, BOOL result) const

Protected Attributes

HANDLE m_h
bool m_own


Detailed Description

Windows Pipe Source.

Definition at line 105 of file winpipes.h.


Member Function Documentation

size_t NonblockingSource::GeneralPump2 ( lword &  byteCount,
bool  blockingOutput = true,
unsigned long  maxTime = INFINITE_TIME,
bool  checkDelimiter = false,
byte  delimiter = '\n' 
) [inherited]

pump up to maxSize bytes using at most maxTime milliseconds

If checkDelimiter is true, pump up to delimiter, which itself is not extracted or pumped.

Definition at line 76 of file network.cpp.

References TimerBase::ElapsedTime(), INFINITE_TIME, TimerBase::StartTimer(), and WaitObjectContainer::Wait().

void WindowsPipeReceiver::GetWaitObjects ( WaitObjectContainer container,
CallStack const &  callStack 
) [virtual, inherited]

put wait objects into container

Parameters:
callStack is used for tracing no wait loops, example: something.GetWaitObjects(c, CallStack("my func after X", 0));
  • or in an outer GetWaitObjects() method that itself takes a callStack parameter: innerThing.GetWaitObjects(c, CallStack("MyClass::GetWaitObjects at X", &callStack));

Implements Waitable.

Definition at line 118 of file winpipes.cpp.

References WaitObjectContainer::AddHandle(), and WaitObjectContainer::SetNoWait().

bool Waitable::Wait ( unsigned long  milliseconds,
CallStack const &  callStack 
) [inherited]

wait on this object

same as creating an empty container, calling GetWaitObjects(), and calling Wait() on the container

Definition at line 388 of file wait.cpp.

References Waitable::GetWaitObjects(), and WaitObjectContainer::Wait().


The documentation for this class was generated from the following file:

Generated on Mon Oct 27 02:45:21 2008 for Crypto++ by  doxygen 1.5.7.1