diff options
Diffstat (limited to 'src/nvim/os/channel.h')
-rw-r--r-- | src/nvim/os/channel.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/nvim/os/channel.h b/src/nvim/os/channel.h new file mode 100644 index 0000000000..c58e91a0e5 --- /dev/null +++ b/src/nvim/os/channel.h @@ -0,0 +1,29 @@ +#ifndef NEOVIM_OS_CHANNEL_H +#define NEOVIM_OS_CHANNEL_H + +#include <uv.h> + +#include "os/channel_defs.h" + +/// Initializes the module +void channel_init(void); + +/// Teardown the module +void channel_teardown(void); + +/// Creates an API channel from a libuv stream representing a tcp or +/// pipe/socket client connection +/// +/// @param stream The established connection +/// @param prot The rpc protocol used +void channel_from_stream(uv_stream_t *stream, ChannelProtocol prot); + +/// Creates an API channel by starting a job and connecting to its +/// stdin/stdout. stderr is forwarded to the editor error stream. +/// +/// @param argv The argument vector for the process +/// @param prot The rpc protocol used +void channel_from_job(char **argv, ChannelProtocol prot); + +#endif // NEOVIM_OS_CHANNEL_H + |