Esempio n. 1
0
        /// <summary>
        /// Set things in motion so your service can do its work.
        /// </summary>
        protected override void OnStart(string[] args)
        {
            // TODO: Add code here to start your service.
            ep = new IPEndPoint(0, 12001);
            a  = new Acceptor(new DefaultServiceHandlerFactory());
            a.open(ep);

            a.accept();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            ep = new IPEndPoint(0, 12003);

            a = new Acceptor(new DefaultServiceHandlerFactory());

            a.open(ep);

            a.accept();
            //wait for shutdown
            System.Threading.AutoResetEvent ev = new System.Threading.AutoResetEvent(false);

            ev.WaitOne();
        }
Esempio n. 3
0
 public override void accept(RedirectedType redirected)
 {
     target.accept(redirected);
     target = null;
 }