Public Member Functions | |
CSimpleNamedPipeServer (const Core::_tstring &name, DWORD numInstances=1, DWORD bufferSize=1024, Milliseconds defaultTimeout=5000) | |
Create a named pipe server for a pipe with the specified name, instances and buffer size. | |
CSimpleNamedPipeServer (const CSimpleNamedPipeServer &rhs) | |
CSimpleNamedPipeServer & | operator= (const CSimpleNamedPipeServer &rhs) |
bool | Connect (Core::COverlapped &overlapped) const |
Accept a connection to a pipe instance. Returns true if an instance is connected and false if the asynchronous connection acceptance is still in progress (use the overlapped object to wait on the connection acceptance completion). | |
void | Disconnect () const |
Disconnects the named pipe. | |
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 |
CSimpleNamedPipeServer | ( | const Core::_tstring & | name, | |
DWORD | numInstances = 1 , |
|||
DWORD | bufferSize = 1024 , |
|||
Milliseconds | defaultTimeout = 5000 | |||
) | [explicit] |
Create a named pipe server for a pipe with the specified name, instances and buffer size.
CSimpleNamedPipeServer | ( | const CSimpleNamedPipeServer & | rhs | ) |
CSimpleNamedPipeServer& operator= | ( | const CSimpleNamedPipeServer & | rhs | ) |
bool Connect | ( | Core::COverlapped & | overlapped | ) | const |
Accept a connection to a pipe instance. Returns true if an instance is connected and false if the asynchronous connection acceptance is still in progress (use the overlapped object to wait on the connection acceptance completion).
void Disconnect | ( | ) | const |
Disconnects the named pipe.
bool Send | ( | const void * | pSendBuffer, | |
DWORD | sendBufferSize, | |||
Core::COverlapped & | overlapped | |||
) | const [inherited] |
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 [inherited] |
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 [inherited] |
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 [inherited] |
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 [inherited] |
CSmartHandle m_handle [protected, inherited] |