Advanced Distributed Systems module at HSLU
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
750 B

using System;
namespace RobotLib.Communication
{
internal interface IPublisherSubscriber
{
/// <summary>
/// New message to a subscribed topic arrived.
/// </summary>
event EventHandler<SubscribedMsgArrivedEventArgs> NewMessageArrived;
/// <summary>
/// Subscribe to a topic.
/// </summary>
/// <param name="topic">The topic to subscribe to.</param>
void Subscribe(string topic);
/// <summary>
/// Publish message to a topic.
/// </summary>
/// <param name="topic">The topic where to publish the data to.</param>
/// <param name="message">Data to publish.</param>
void Publish(string topic, string message);
}
}