コード例 #1
0
ファイル: Client.cs プロジェクト: jatowers/Blighttp
 public Client(WebServer server, Socket socket)
 {
     ClientServer = server;
     ClientSocket = socket;
     ClientSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, ReceiveTimeout);
     Buffer = "";
 }
コード例 #2
0
ファイル: WebService.cs プロジェクト: nolanlum/MyRiotControl
        public WebService(Configuration configuration, StatisticsService statisticsService, DatabaseConnectionProvider databaseProvider)
        {
            ProgramConfiguration = configuration;
            ServiceConfiguration = configuration.Web;
            Statistics = statisticsService;
            Server = new WebServer(ServiceConfiguration.Host, ServiceConfiguration.Port, Observe);

            DatabaseProvider = databaseProvider;

            WebServiceProfiler = new Profiler();

            Serialiser = new JavaScriptSerializer();

            LoadChampionNames();
            LoadItemInformation();

            InitialiseHandlers();
        }
コード例 #3
0
ファイル: WebService.cs プロジェクト: Rejna/RiotControl
        public WebService(IGlobalHandler globalHandler, Configuration configuration, StatisticsService statisticsService, Database databaseProvider)
        {
            GlobalHandler = globalHandler;
            ProgramConfiguration = configuration;
            ServiceConfiguration = configuration.Web;
            StatisticsService = statisticsService;
            Server = new WebServer(ServiceConfiguration.Host, ServiceConfiguration.Port, ServiceConfiguration.EnableReverseProxyRealIPMode, this, this);

            DatabaseProvider = databaseProvider;

            WebServiceProfiler = new Profiler();

            Serialiser = new JavaScriptSerializer();

            Views = new HashSet<string>();
            PRNG = new Random();

            LoadIndex();
            InitialiseHandlers();
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: LeeSeungSoo/Blighttp
        static void Main(string[] arguments)
        {
            WebServer server = new WebServer("127.0.0.1", 9000);

            Handler container = new Handler("blight");
            server.Add(container);

            Handler markupHandler = new Handler("markup", MarkupTest);
            container.Add(markupHandler);

            Handler exceptionHandler = new Handler("exception", ExceptionTest);
            container.Add(exceptionHandler);

            SubmissionHandler = new Handler("submission", SubmissionTest);
            container.Add(SubmissionHandler);

            Handler chunkedHandler = Handler.ChunkedHandler("chunked", ChunkedTest, ContentType.Markup);
            container.Add(chunkedHandler);

            server.Run();
        }