Пример #1
0
 internal HostBuilder(int port, ServerBuilder parent)
 {
     builder         = parent;
     Result          = new SimpleServerHost();
     Result.Endpoint = new SimpleServerEndpoint {
         Scope = IPAddress.Loopback, Port = port
     };
 }
Пример #2
0
        public HandlerManager With(SimpleServerHost host, params IHandler[] handlers)
        {
            foreach (var handler in handlers)
            {
                Add(host, handler);
            }

            return(this);
        }
        public SimpleServerHost GetWildcardHost()
        {
            SimpleServerHost result = null;

            Hosts.ForEach(x =>
            {
                if (x.FQDN == "*" || x.AliasFQDNs.Contains("*"))
                {
                    result = x;
                }
            });
            return(result);
        }
Пример #4
0
 public void Add(SimpleServerHost host, IHandler handler)
 {
     handlers.Add(handler);
 }
Пример #5
0
 internal static ILog GetLogger(SimpleServerHost host)
 {
     SimpleServer.Initialize();
     return(new Log(host.FQDN));
 }