98 return xxx->
pipe->
Wait(event, timeout);
192 (
const string& pipename,
202 xxx->pipename = pipename;
203 xxx->pipesize = pipesize;
206 ccc->handle = xxx.release();
212 return ccc.release();
unique_ptr< T, TDeleter > make_c_unique(T *p, TDeleter d)
Eliminates the necessity for specifying types of both allocated resource and deallocating C function.
CONNECTOR NAMEDPIPE_CreateConnector(const string &pipename, size_t pipesize)
Create CNamedPipe-based CONNECTOR.
#define CONN_SET_METHOD(meta, method, function, connector)
const STimeout * default_timeout
default timeout pointer
void * handle
data handle of the connector
SMetaConnector * meta
back link to original meta
EIO_Status Wait(EIO_Event event, const STimeout *timeout)
Wait for I/O readiness in the pipe.
EIO_Status Status(EIO_Event direction) const
Return (for the specified "direction"): eIO_Closed – if the pipe is closed for I/O; eIO_Timeout – if ...
EIO_Status Close(void)
Close pipe connection.
EIO_Status Read(void *buf, size_t count, size_t *n_read=0)
Read data from the pipe.
EIO_Status SetTimeout(EIO_Event event, const STimeout *timeout)
Specify timeout for the pipe I/O (see Open|Read|Write functions).
EIO_Status Open(const string &pipename, const STimeout *timeout=kDefaultTimeout, size_t pipesize=0, TFlags flags=0)
Open a client-side pipe connection.
EIO_Status Write(const void *buf, size_t count, size_t *n_written=0)
Write data to the pipe.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
EIO_Event
I/O event (or direction).
@ eIO_Success
everything is fine, no error occurred
const struct ncbi::grid::netcache::search::fields::SIZE size
static EIO_Status s_VT_Close(CONNECTOR connector, const STimeout *)
static EIO_Status s_VT_Write(CONNECTOR connector, const void *buf, size_t size, size_t *n_written, const STimeout *timeout)
static EIO_Status s_VT_Read(CONNECTOR connector, void *buf, size_t size, size_t *n_read, const STimeout *timeout)
static EIO_Status s_VT_Open(CONNECTOR connector, const STimeout *timeout)
static const char * s_VT_GetType(CONNECTOR)
static void s_Setup(CONNECTOR connector)
static EIO_Status s_VT_Status(CONNECTOR connector, EIO_Event dir)
static EIO_Status s_VT_Wait(CONNECTOR connector, EIO_Event event, const STimeout *timeout)
static void s_Destroy(CONNECTOR connector)
static char * s_VT_Descr(CONNECTOR connector)
Implement CONNECTOR for a named pipe interprocess communication (based on the NCBI CNamedPipe).