Example #1
0
        // TODO this should take a Port number
        public static void Run(IApplication application)
        {
            KayakServer server = new KayakServer();
            IDisposable pipe   = server.Invoke(application) as IDisposable;

            Console.WriteLine("KayakServer is running at http://localhost:8080/");
            Console.WriteLine("Press any key to exit");
            Console.Read();
            pipe.Dispose();
        }
Example #2
0
        public ServerLoginUI(string authEndpointUrl)
        {
            InitializeComponent();

            webBrowser1.Url = new Uri(authEndpointUrl);

            var server = new KayakServer();

            server.UseFramework();
            server.Start(new IPEndPoint(IPAddress.Any, 25512));

            this.FormClosing += (s, e) => server.Stop();
        }
Example #3
0
        public void Start(int PortHTTP, int PortTCP)
        {
            if (mStarted)
            {
                return;
            }
            mStarted  = true;
            mPortHttp = PortHTTP;
            mPortTcp  = PortTCP;

            // HTTP
            KayakServer server = new KayakServer();

            server.UseFramework();
            server.Start(new IPEndPoint(IPAddress.Any, mPortHttp));

            // TCP
            ValTcpService ts = new ValTcpService(mPortTcp);

            DoLoop();
        }