src/nvim/os/channel.c
bool channel_send_event(uint64_t id, char *name, Array args)
{
  Channel *channel = NULL;

  if (id > 0) {
    if (!(channel = pmap_get(uint64_t)(channels, id)) || !channel->enabled) {
      msgpack_rpc_free_array(args);
      return false;
    }
    send_event(channel, name, args);
  } else {
    broadcast_event(name, args);
  }

  return true;
}
/// Sends event/arguments to channel
///
/// @param id The channel id. If 0, the event will be sent to all
///        channels that have subscribed to the event type
/// @param name The event name, an arbitrary string
/// @param args Array with event arguments
/// @return True if the event was sent successfully, false otherwise.
Sends event/arguments to channel
Sends event / arguments to channel
bool channel_send_event(uint64_t id, char *name, Array args)
{
  Channel *channel = NULL;
  if (id > 0) {
    if (!(channel = pmap_get(uint64_t)(channels, id)) || !channel->enabled) {
      msgpack_rpc_free_array(args);
      return false;
    }
    send_event(channel, name, args);
  } else {
    broadcast_event(name, args);
  }
  return true;
}
bool channel_send_event ( uint64_t id , char * name , Array args ) { Channel * channel = NULL ; if ( id > 0 ) { if ( ! ( channel = pmap_get ( uint64_t ) ( channels , id ) ) || ! channel -> enabled ) { msgpack_rpc_free_array ( args ) ; return false ; } send_event ( channel , name , args ) ; } else { broadcast_event ( name , args ) ; } return true ; }
Sends event/arguments to channel
Sends event / arguments to channel