示例#1
0
        /// <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);
        }
示例#2
0
 /// <summary>
 /// Uses HTTP Protocol and accepts HTTP connections
 /// </summary>
 public static IHorseServer UseHttp(this IHorseServer server, HttpRequestHandler action)
 {
     return(UseHttp(server, action, HttpOptions.CreateDefault()));
 }