Exemplo n.º 1
0
        /// <summary>
        /// Registers a gateway to handle incoming PUPs.
        /// </summary>
        /// <param name="callback"></param>
        public void RegisterRouterCallback(RoutePupCallback callback)
        {
            _routerCallback = callback;

            // Now that we have a callback we can start receiving stuff.
            BeginReceive();
        }
Exemplo n.º 2
0
        public void RegisterRouterCallback(RoutePupCallback callback)
        {
            _routerCallback = callback;

            // Now that we have a callback we can start receiving stuff.
            Open(false /* not promiscuous */, int.MaxValue);

            // Kick off the receiver thread, this will never return or exit.
            Thread receiveThread = new Thread(new ThreadStart(BeginReceive));

            receiveThread.Start();
        }