The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CNamedPipe Class Reference
[Interprocess Communication]

Inheritance diagram for CNamedPipe:
Collaboration diagram for CNamedPipe:

List of all members.


Detailed Description

A simple wrapper around the Named Pipe API.


Public Member Functions

 CNamedPipe (HANDLE hPipe)
 Attach the class to the named pipe represented by the supplied HANDLE.
 CNamedPipe (const CNamedPipe &rhs)
virtual ~CNamedPipe ()
CNamedPipeoperator= (const CNamedPipe &rhs)
bool Send (const void *pSendBuffer, DWORD sendBufferSize, Core::COverlapped &overlapped) const
 Send the data in the supplied buffer using the supplied COverlapped object for overlapped I/O notifications.
bool Receive (void *pReceiveBuffer, DWORD receiveBufferSize, Core::COverlapped &overlapped, DWORD *pBytesReceived) const
 Receive from the pipe into the supplied buffer using the supplied COverlapped object for overlapped I/O notifications.
bool SendAndReceive (const void *pSendBuffer, DWORD sendBufferSize, void *pReceiveBuffer, DWORD receiveBufferSize, Core::COverlapped &overlapped, DWORD *pBytesReceived) const
 Send the supplied send buffer and receive a response from the pipe into the receive buffer using the COverlapped object for overlapped I/O notifications.
DWORD GetOverlappedResult (Core::COverlapped &overlapped) const
 Call GetOverlappedResult on the supplied COverlapped object using the pipe's HANDLE and returns the number of bytes transferred. Throws an exception on failure.
bool CancelIo () const

Protected Attributes

CSmartHandle m_handle


Constructor & Destructor Documentation

CNamedPipe ( HANDLE  hPipe  )  [explicit]

Attach the class to the named pipe represented by the supplied HANDLE.

CNamedPipe ( const CNamedPipe rhs  ) 

virtual ~CNamedPipe (  )  [virtual]


Member Function Documentation

CNamedPipe& operator= ( const CNamedPipe rhs  ) 

bool Send ( const void *  pSendBuffer,
DWORD  sendBufferSize,
Core::COverlapped overlapped 
) const

Send the data in the supplied buffer using the supplied COverlapped object for overlapped I/O notifications.

bool Receive ( void *  pReceiveBuffer,
DWORD  receiveBufferSize,
Core::COverlapped overlapped,
DWORD pBytesReceived 
) const

Receive from the pipe into the supplied buffer using the supplied COverlapped object for overlapped I/O notifications.

bool SendAndReceive ( const void *  pSendBuffer,
DWORD  sendBufferSize,
void *  pReceiveBuffer,
DWORD  receiveBufferSize,
Core::COverlapped overlapped,
DWORD pBytesReceived 
) const

Send the supplied send buffer and receive a response from the pipe into the receive buffer using the COverlapped object for overlapped I/O notifications.

DWORD GetOverlappedResult ( Core::COverlapped overlapped  )  const

Call GetOverlappedResult on the supplied COverlapped object using the pipe's HANDLE and returns the number of bytes transferred. Throws an exception on failure.

bool CancelIo (  )  const


Member Data Documentation

CSmartHandle m_handle [protected]


Generated on Sun Sep 12 19:11:38 2021 for The Server Framework - v7.4 by doxygen 1.5.3