using System;
using grof.util;
using grof;
namespace grof.protocols{
/// <summary>
/// The <c>IProtocol</c> interface is implemented
/// by a protocol instance which is responsible for
/// processing incoming and outgoing messages.
/// </summary>
public interface IProtocol
{
/// <summary>
/// Puts a message into the outgoing queue.
/// </summary>
/// <param name="msg">The message which is put into
/// the outgoing queue.</param>
void PutOutgoing( Message msg );
/// <summary>
/// Retrieves a message from the incoming queue.
/// </summary>
/// <returns>The message from the incoming queue.</returns>
Message TakeIncoming();
/// <summary>
/// Starts working of the protocol instance.
/// </summary>
void Start();
/// <summary>
/// Stops working of the protocol instance.
/// </summary>
void Stop();
}
}
|