gboolean vortex_channel_send_msg VortexChannel channel,
gchar *  message,
gint  message_size,
gint *  msg_no
 

Allows to send a message.

Sends the message over the selected channel. It will create the needed frames to be sent to remote peer connected by session where channel is created.

On msg_no will be returned the message number used for this delivery. This can be useful for waiting response for this message on this channel.

A usual question you may have is: could I remove the message chunk I've used to call this function. The answer is yes. This function makes a local copy you can directly free used message as follows:

      // we create some dynamically allocated message
      gchar * message = g_strdup_printf ("%d - %s ..\n", 10, 
                                         "some kind of very important message");

      if (!vortex_channel_send_msg (channel, message, strlen (message), NULL)) {
             // some kind of error process and free your resources
             g_free (message);

      }

      // you should free dynamically allocated resources no longer
      // used just after running vortex_channel_send_msg.

      g_free (message);

Parameters:
channel where message will be sent
message the message to send
message_size the message size (user space calculated, that is actual message size)
msg_no returns the message number used for this deliver. If NULL the message number will not be returned.
Returns:
TRUE if message could be sent, FALSE if fail