next up previous contents
Next: Java Library Up: openmaia::connector object Previous: Receiving messages   Contents

Sending messages

Messages can be sent using send_message method. Before sending the message is necessary to build an openmaia::message object that will be passed to send_message method.

Here is an example of how to send a message with two parameters.

  ...
  // assume my_connector points to an instance of openmaia::connector 
  //already connected to the server

  // create the message
  openmaia::message my_message;
  my_message.set_command("TEST");
  my_message.add_parameter("PARAMETER1");
  my_message.add_parameter("PARAMETER2");

  // send the message
  my_connector->send_message(my_message);


2005-07-12