PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening > Class Template Reference

Implements a simple Named Pipe Server with automatic reconnection support. More...

#include <pipesrv.h>

List of all members.

Public Member Functions

unsigned GetLastOperationError ()
bool ReconnectPipe ()
 ~PipeServer ()
 PipeServer (const TCHAR *pszPipeName, unsigned Timeout=1000)
size_t Send (const void *pData, size_t Size)
size_t Receive (void *pData, size_t Size, bool PartialRecvAllowed=true)
bool HasDataInBuffer ()
bool IsClientConnected ()
void DiscardBufferedData ()
bool ReconnectPending ()

Private Member Functions

HANDLE CreatePipeInstance ()
template<bool out>
size_t TransferWithTimeout (void *pData, size_t size)

Private Attributes

HANDLE m_hPipe
HANDLE m_hNextInstance
BazisLib::String m_PipeName
bool m_bReconnectPending
bool m_bClientConnected
unsigned m_Timeout
unsigned m_LastError
OVERLAPPED m_Overlapped
HANDLE m_hEvt


Detailed Description

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
class PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >

Implements a simple Named Pipe Server with automatic reconnection support.

Definition at line 12 of file pipesrv.h.


Constructor & Destructor Documentation

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::~PipeServer (  )  [inline]

Definition at line 96 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::PipeServer ( const TCHAR *  pszPipeName,
unsigned  Timeout = 1000 
) [inline]

Definition at line 106 of file pipesrv.h.


Member Function Documentation

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
HANDLE PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::CreatePipeInstance (  )  [inline, private]

Definition at line 27 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
void PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::DiscardBufferedData (  )  [inline]

Definition at line 224 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
unsigned PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::GetLastOperationError (  )  [inline]

Definition at line 73 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
bool PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::HasDataInBuffer (  )  [inline]

Definition at line 189 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
bool PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::IsClientConnected (  )  [inline]

Definition at line 219 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
size_t PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::Receive ( void *  pData,
size_t  Size,
bool  PartialRecvAllowed = true 
) [inline]

Definition at line 144 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
bool PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::ReconnectPending (  )  [inline]

Definition at line 250 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
bool PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::ReconnectPipe (  )  [inline]

Definition at line 78 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
size_t PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::Send ( const void *  pData,
size_t  Size 
) [inline]

Definition at line 121 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
template<bool out>
size_t PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::TransferWithTimeout ( void *  pData,
size_t  size 
) [inline, private]

Definition at line 40 of file pipesrv.h.


Member Data Documentation

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
bool PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::m_bClientConnected [private]

Definition at line 19 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
bool PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::m_bReconnectPending [private]

Definition at line 18 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
HANDLE PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::m_hEvt [private]

Definition at line 24 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
HANDLE PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::m_hNextInstance [private]

Definition at line 16 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
HANDLE PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::m_hPipe [private]

Definition at line 15 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
unsigned PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::m_LastError [private]

Definition at line 21 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
OVERLAPPED PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::m_Overlapped [private]

Definition at line 23 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
BazisLib::String PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::m_PipeName [private]

Definition at line 17 of file pipesrv.h.

template<bool _MessageOriented, bool _AutoReconnect, bool _FailTransferOnListening = false>
unsigned PipeServer< _MessageOriented, _AutoReconnect, _FailTransferOnListening >::m_Timeout [private]

Definition at line 20 of file pipesrv.h.


The documentation for this class was generated from the following file:
  • E:/PROJECTS/cvsed/mixed/VIRTUA~1/rpcdispatch/pipesrv.h