Beispiel #1
0
        /// <summary>
        /// Uses HMQ Protocol and accepts TCP connections.
        /// </summary>
        public static IHorseServer UseHmq(this IHorseServer server, HorseMessageHandler action)
        {
            HorseMethodHandler handler  = new HorseMethodHandler(action);
            HorseMqProtocol    protocol = new HorseMqProtocol(server, handler);

            server.UseProtocol(protocol);
            return(server);
        }
 /// <summary>
 /// Creates new HMQ protocol handler for action-based message handling use
 /// </summary>
 /// <param name="action"></param>
 public HorseMethodHandler(HorseMessageHandler action)
 {
     _action = action;
 }