Function silc_client_send_channel_message
SYNOPSIS
SilcBool silc_client_send_channel_message(SilcClient client,
SilcClientConnection conn,
SilcChannelEntry channel,
SilcChannelPrivateKey key,
SilcMessageFlags flags,
SilcHash hash,
unsigned char *data,
SilcUInt32 data_len);
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 `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. In this case the `hash'
pointer must be provided as well.
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). This function is thread safe and private messages can be
sent from multiple threads.
|