Exemple #1
0
    private void InitWebServices()
    {
        string htmlDoc = htmlTemplate.ToString().Replace("{", "{{").Replace("}", "}}").Replace("{{0}}", "{0}").Replace("{{1}}", "{1}");

        string htmlResponse = string.Format(
            htmlDoc,
            Regex.Match(httpUrls[2], "(http|https)(:\\/\\/)(.+)(:.\\d+)").Groups[3].Value,
            wsPort
            );

        httpService = new HttpServer(htmlResponse, httpUrls);
        wsService   = new WSServer(wsPort);
        httpService.Run();
        wsService.Run();
    }