src/nvim/os/channel.c
static void channel_from_stdio(void)
{
  Channel *channel = register_channel();
  channel->is_job = false;
  // read stream
  channel->data.streams.read = rstream_new(parse_msgpack,
                                           CHANNEL_BUFFER_SIZE,
                                           channel,
                                           NULL);
  rstream_set_file(channel->data.streams.read, 0);
  rstream_start(channel->data.streams.read);
  // write stream
  channel->data.streams.write = wstream_new(0);
  wstream_set_file(channel->data.streams.write, 1);
  channel->data.streams.uv = NULL;
}
/// Creates an API channel from stdin/stdout. This is used when embedding
/// Neovim
Creates an API channel from stdin/stdout. This is used when embedding
Neovim
Creates an API channel from stdin / stdout . This is used when embedding Neovim
static void channel_from_stdio(void)
{
  Channel *channel = register_channel();
  channel->is_job = false;
  channel->data.streams.read = rstream_new(parse_msgpack,
                                           CHANNEL_BUFFER_SIZE,
                                           channel,
                                           NULL);
  rstream_set_file(channel->data.streams.read, 0);
  rstream_start(channel->data.streams.read);
  channel->data.streams.write = wstream_new(0);
  wstream_set_file(channel->data.streams.write, 1);
  channel->data.streams.uv = NULL;
}
static void channel_from_stdio ( void ) { Channel * channel = register_channel ( ) ; channel -> is_job = false ; channel -> data . streams . read = rstream_new ( parse_msgpack , CHANNEL_BUFFER_SIZE , channel , NULL ) ; rstream_set_file ( channel -> data . streams . read , 0 ) ; rstream_start ( channel -> data . streams . read ) ; channel -> data . streams . write = wstream_new ( 0 ) ; wstream_set_file ( channel -> data . streams . write , 1 ) ; channel -> data . streams . uv = NULL ; }
Creates an API channel from stdin/stdout.
Creates an API channel from stdin / stdout .
// read stream // write stream