Library reference

Constructor

public AbtooConnection(string QueueName, int HeartBeat)

This is the only public constructor available to crete a new abetoo connection. You need to pass 2 parameters.

  • QueueName, local channel id.
  • HeartBeat, Timeout. Used to check the health of a connection.

Methods

public void connect()

Used to establish a connection with the remote server, normally called just after the creation of a new abetoo object. Once the connection is triggered, the abetoo object takes care about connection lost management and reconnections.

No parameters.

public void disconnect()

Disconnect the current connection from the remote server.

No parameters.

public bool isConnected()

Return the status of the connection either connected (true) or disconnected (false)

No parameters.

public bool sendMessage(String DestinationId, String Body, String Correlationid)

Used to send messages to a remote device using it’s channel id

  • DestinationId, channel id of the remote device you want to send a message.
  • Body, message as a XML/JSON or as a plain text.
  • Correlationid,¬†used to keep track about the messages sent/received. If you want to use a challenge/response approach you can associate the challenge sent message with a correlation id, once a message is received you can use its correlation id to identify the associated challenge message.

Events

 EventHandler<AbtooMessage> messageReceived

Triggered whenever a new message is received.

Was this article helpful?

Related Articles

Leave A Comment?