Ejemplo n.º 1
0
        /// <summary>
        /// Uses TMQ Protocol and accepts TCP connections.
        /// </summary>
        public static ITwinoServer UseTmq(this ITwinoServer server, TmqMessageHandler action)
        {
            TmqMethodHandler handler  = new TmqMethodHandler(action);
            TwinoTmqProtocol protocol = new TwinoTmqProtocol(server, handler);

            server.UseProtocol(protocol);
            return(server);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates new TMQ protocol handler for action-based message handling use
 /// </summary>
 /// <param name="action"></param>
 public TmqMethodHandler(TmqMessageHandler action)
 {
     _action = action;
 }