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 encrypted message to the `channel'. The plaintext message is
the `data' of `data_len' bytes in length.
If `key' is provided then that private channel message key is used to
encrypt the message. If it is not provided and the `channel' does not
have SILC_CHANNEL_MODE_PRIVKEY set, the curent channel key is used
instead. If the mode is set but `key' is NULL the key that was added
first as private channel message key will be used.
If the `flags' includes SILC_MESSAGE_FLAG_SIGNED the message will be
digitally signed with the SILC key pair associated with the `conn'.
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 channel messages can be
sent from multiple threads.
|