Function silc_client_send_channel_message
SYNOPSIS
bool silc_client_send_channel_message(SilcClient client,
SilcClientConnection conn,
SilcChannelEntry channel,
SilcChannelPrivateKey key,
SilcMessageFlags flags,
unsigned char *data,
SilcUInt32 data_len,
bool_force_send);
DESCRIPTION
Sends packet to the `channel'. Packet to channel is always encrypted
differently from "normal" packets. SILC header of the packet is
encrypted with the next receiver's key and the rest of the packet is
encrypted with the channel specific key. Padding and HMAC is computed
with the next receiver's key. The `data' is the channel message. If
the `force_send' is TRUE then the packet is sent immediately.
If `key' is provided then that private key is used to encrypt the
channel message. If it is not provided, private keys has not been
set at all, the normal channel key is used automatically. If private
keys are set then the first key (the key that was added first as
private key) is used.
If the `flags' includes SILC_MESSAGE_FLAG_SIGNED the message will be
digitally signed with the SILC key pair.
Returns TRUE if the message was sent, and FALSE if error occurred or
the sending is not allowed due to channel modes (like sending is
blocked).
|