/// <summary> /// Uses HTTP Protocol and accepts HTTP connections /// </summary> public static IHorseServer UseHttp(this IHorseServer server, HttpRequestHandler action, HttpOptions options) { HttpMethodHandler handler = new HttpMethodHandler(action); HorseHttpProtocol protocol = new HorseHttpProtocol(server, handler, options); server.UseProtocol(protocol); return(server); }
/// <summary> /// Uses HTTP Protocol and accepts HTTP connections /// </summary> public static IHorseServer UseHttp(this IHorseServer server, HttpRequestHandler action) { return(UseHttp(server, action, HttpOptions.CreateDefault())); }