예제 #1
0
 public HttpContextBuilder(HttpContext httpContext, RequestContextBuilder requestContextBuilder, ResponseContextBuilder responseContextBuilder, ServerContext serverContext)
 {
     _httpContext = httpContext;
     _requestContextBuilder = requestContextBuilder;
     _responseContextBuilder = responseContextBuilder;
     _serverContext = serverContext;
 }
 public RequestResponseHandler(HttpContextBuilder httpContextBuilder, HttpApplicationHandler httpApplicationHandler, ResponseHandler responseHandler, ServerContext serverContext)
 {
     _httpContextBuilder = httpContextBuilder;
     _httpApplicationHandler = httpApplicationHandler;
     _responseHandler = responseHandler;
     _serverContext = serverContext;
 }
예제 #3
0
 public SocketListener(RequestHandlerFactory requestHandlerFactory, ServerContext serverContext)
 {
     _requestHandlerFactory = requestHandlerFactory;
     _serverContext         = serverContext;
 }
 public ResponseHandler(ServerContext serverContext, ResponseHeaderBuilder responseHeaderBuilder)
 {
     _serverContext = serverContext;
     _responseHeaderBuilder = responseHeaderBuilder;
 }
예제 #5
0
 public RequestResponseHandler(HttpContextBuilder httpContextBuilder, HttpApplicationHandler httpApplicationHandler, ResponseHandler responseHandler, ServerContext serverContext)
 {
     _httpContextBuilder     = httpContextBuilder;
     _httpApplicationHandler = httpApplicationHandler;
     _responseHandler        = responseHandler;
     _serverContext          = serverContext;
 }
예제 #6
0
 public ResponseHandler(ServerContext serverContext, ResponseHeaderBuilder responseHeaderBuilder)
 {
     _serverContext         = serverContext;
     _responseHeaderBuilder = responseHeaderBuilder;
 }
예제 #7
0
 public RequestContextBuilder(ServerContext serverContext)
 {
     _serverContext = serverContext;
 }
 public RequestHandlerFactory(ServerContext serverContext)
 {
     _serverContext = serverContext;
 }
 public SocketListener(RequestHandlerFactory requestHandlerFactory, ServerContext serverContext)
 {
     _requestHandlerFactory = requestHandlerFactory;
     _serverContext = serverContext;
 }
예제 #10
0
 public HttpContextBuilder(HttpContext httpContext, RequestContextBuilder requestContextBuilder, ResponseContextBuilder responseContextBuilder, ServerContext serverContext)
 {
     _httpContext            = httpContext;
     _requestContextBuilder  = requestContextBuilder;
     _responseContextBuilder = responseContextBuilder;
     _serverContext          = serverContext;
 }
예제 #11
0
        private void MyThreadStart(ServerContext serverContext)
        {
            var serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            var localEndPoint = new IPEndPoint(new NetworkInterfaceLocator().Locate(), serverContext.ServerListeningPort);
            Debug.Print("Local endpoint, IP: " + localEndPoint.Address + " Port: " + localEndPoint.Port);
            Debug.Print("http://" + localEndPoint.Address + ":" + localEndPoint.Port + "/");
            serverSocket.Bind(localEndPoint);
            serverSocket.Listen(2);

            var socketListener = new SocketListener(new RequestHandlerFactory(serverContext), _serverContext);
            socketListener.StartListening(serverSocket);
        }
예제 #12
0
 public ServerBase()
 {
     _routeGenerator = new RouteGenerator();
     _routeTable = new RouteTable();
     _serverContext = new ServerContext(GetType().Assembly, _routeTable);
 }
예제 #13
0
 public ServerBase()
 {
     _routeGenerator = new RouteGenerator();
     _routeTable     = new RouteTable();
     _serverContext  = new ServerContext(GetType().Assembly, _routeTable);
 }
 public RequestContextBuilder(ServerContext serverContext)
 {
     _serverContext = serverContext;
 }
예제 #15
0
 public RequestHandlerFactory(ServerContext serverContext)
 {
     _serverContext = serverContext;
 }