예제 #1
0
        public void Receive(HostSettings settings)
        {
            var port = settings.Port;

            Relay (settings);
            Link ("http://localhost:{0}".Fmt (settings.Port));
        }
예제 #2
0
        public void Relay(HostSettings settings)
        {
            var port = settings.Port;

            var host = new NancyHost (new Uri ("http://localhost:{0}".Fmt (port)), new WarpgateBootstrapper (kernel));
            host.Start ();

            var relayServer = new RelayServer ();
            relayServer.Start ();
            kernel.Bind<IRelayServer> ().ToConstant (relayServer);
        }