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; }
public SocketListener(RequestHandlerFactory requestHandlerFactory, ServerContext serverContext) { _requestHandlerFactory = requestHandlerFactory; _serverContext = serverContext; }
public ResponseHandler(ServerContext serverContext, ResponseHeaderBuilder responseHeaderBuilder) { _serverContext = serverContext; _responseHeaderBuilder = responseHeaderBuilder; }
public RequestContextBuilder(ServerContext serverContext) { _serverContext = serverContext; }
public RequestHandlerFactory(ServerContext serverContext) { _serverContext = serverContext; }
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); }
public ServerBase() { _routeGenerator = new RouteGenerator(); _routeTable = new RouteTable(); _serverContext = new ServerContext(GetType().Assembly, _routeTable); }