示例#1
0
        public LLUPRouterService (string ipToBind, int portToBind, int servingPort, IRouterFilter filter)
        {
            // This call is required by the Windows.Forms Component Designer.
            InitializeComponent();

            boundTo = new MessageClient(ipToBind, portToBind, "\r\n");
            servingOn = new MessageServer(servingPort, "\r\n");

            router = new RouterHandler();
            router.ReceiverService = boundTo.Service;
            router.FilterService = servingOn.Service;
            if (filter != null)
                router.Filter = filter;
        }
示例#2
0
 /// <summary>
 /// The FilterHandler is in charge of deciding whether or not an 
 /// incoming notification can be propagated down the stream or not
 /// based on the filter set.
 /// By default all notifications are forwarded as-is. Your application
 /// shoud implement IRouterFilter and set the Filter property
 /// to an instance of your own filter class.
 /// </summary>
 public FilterHandler () {
     filter = new DefaultRouterFilter();
 }