1
#include "named_pipe_server.h"
3
# include <sys/types.h>
4
# include <sys/unistd.h>
5
# include <sys/socket.h>
7
clNamedPipeServer::clNamedPipeServer(const char* pipePath)
8
: clNamedPipe(pipePath)
14
clNamedPipeServer::~clNamedPipeServer(void)
19
void clNamedPipeServer::disconnect()
21
this->setLastError(ZNP_OK);
23
if (_pipeHandle != INVALID_PIPE_HANDLE) {
24
FlushFileBuffers(_pipeHandle);
25
DisconnectNamedPipe(_pipeHandle);
26
CloseHandle(_pipeHandle);
27
_pipeHandle = INVALID_PIPE_HANDLE;
30
if( _pipeHandle != INVALID_PIPE_HANDLE ) {
32
shutdown(_pipeHandle, SHUT_RDWR);
33
_pipeHandle = INVALID_PIPE_HANDLE;