2022-07-26 05:52:12 +00:00
|
|
|
#ifndef __HGNAMEDPIPE_H__
|
|
|
|
#define __HGNAMEDPIPE_H__
|
|
|
|
|
|
|
|
#include "HGDef.h"
|
|
|
|
#include "HGBaseErr.h"
|
|
|
|
|
2022-08-10 02:22:13 +00:00
|
|
|
HG_DECLARE_HANDLE(HGNamedPipeServer);
|
|
|
|
HG_DECLARE_HANDLE(HGNamedPipeClient);
|
2022-07-26 05:52:12 +00:00
|
|
|
|
2022-08-10 02:22:13 +00:00
|
|
|
HGEXPORT HGResult HGAPI HGBase_OpenNamedPipeServer(const HGChar* pipeName, HGNamedPipeServer *server);
|
2022-07-26 05:52:12 +00:00
|
|
|
|
2022-08-10 02:22:13 +00:00
|
|
|
HGEXPORT HGResult HGAPI HGBase_CloseNamedPipeServer(HGNamedPipeServer server);
|
2022-07-26 05:52:12 +00:00
|
|
|
|
2022-08-10 02:22:13 +00:00
|
|
|
HGEXPORT HGResult HGAPI HGBase_NamedPipeServerWrite(HGNamedPipeServer server, const HGByte* data, HGUInt size, HGUInt* writeSize);
|
2022-07-26 05:52:12 +00:00
|
|
|
|
2022-08-10 02:22:13 +00:00
|
|
|
HGEXPORT HGResult HGAPI HGBase_NamedPipeServerRead(HGNamedPipeServer server, HGByte* data, HGUInt size, HGUInt* readSize);
|
2022-07-26 10:22:02 +00:00
|
|
|
|
2022-08-10 02:22:13 +00:00
|
|
|
HGEXPORT HGResult HGAPI HGBase_NamedPipeServerStop(HGNamedPipeServer server);
|
2022-07-26 05:52:12 +00:00
|
|
|
|
2022-08-10 02:22:13 +00:00
|
|
|
HGEXPORT HGResult HGAPI HGBase_OpenNamedPipeClient(const HGChar* pipeName, HGNamedPipeClient* client);
|
2022-07-26 05:52:12 +00:00
|
|
|
|
2022-08-10 02:22:13 +00:00
|
|
|
HGEXPORT HGResult HGAPI HGBase_CloseNamedPipeClient(HGNamedPipeClient client);
|
2022-07-26 05:52:12 +00:00
|
|
|
|
2022-08-10 02:22:13 +00:00
|
|
|
HGEXPORT HGResult HGAPI HGBase_NamedPipeClientWrite(HGNamedPipeClient client, const HGByte* data, HGUInt size, HGUInt* writeSize);
|
|
|
|
|
|
|
|
HGEXPORT HGResult HGAPI HGBase_NamedPipeClientRead(HGNamedPipeClient client, HGByte* data, HGUInt size, HGUInt* readSize);
|
|
|
|
|
|
|
|
HGEXPORT HGResult HGAPI HGBase_NamedPipeClientStop(HGNamedPipeClient client);
|
2022-07-26 10:22:02 +00:00
|
|
|
|
2022-07-26 05:52:12 +00:00
|
|
|
#endif /* __HGNAMEDPIPE_H__ */
|