public
Created — forked from ry/uv-ipc.c

  • Download Gist
uv-ipc.c
C
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
typedef struct uv_ipc_s uv_ipc_t;
 
/* uv_ipc_t is a subclass of uv_stream_t */
struct uv_ipc_s {
UV_HANDLE_FIELDS
UV_STREAM_FIELDS
UV_IPC_PRIVATE_FIELDS
};
 
 
typedef struct uv_process_options_s {
/* ... add the following */
uv_ipc_t* channel;
};
 
 
 
 
/*
* Called from child.
*
* This may be called exactly once per child process. Returns zero on success.
*/
int uv_ipc_init(uv_loop_t*, uv_ipc_t*);
 
/*
* Called from child.
*
* This should be called from the read_cb to determine if there is a pending
* incoming handle. If so this function returns the type of that pending
* incoming handle. If there is no pending incoming then this returns
* UV_UNKNOWN.
* uv_accept() should be used when there is a pending connection.
*/
uv_handle_type uv_ipc_pending(uv_ipc_t*);
 
/*
* Called from parent or child.
*
* sends the given stream to the other process.
*/
void uv_ipc_send(uv_ipc_t*, uv_stream_t*);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.