#include <winpipes.h>
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 NetworkReceiver & | GetReceiver () 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 |
Definition at line 105 of file winpipes.h.
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
callStack | is used for tracing no wait loops, example: something.GetWaitObjects(c, CallStack("my func after X", 0));
|
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().