internal static HttpResponse CreateCloseResponse(HttpStatusCode code) { var res = new HttpResponse(code); res.Headers["Connection"] = "close"; return(res); }
internal HttpResponse(HttpStatusCode code, string reason) : this(((int)code).ToString(), reason, HttpVersion.Version11, new NameValueCollection()) { Headers["Server"] = "websocket-sharp/1.0"; }
internal HttpResponse(HttpStatusCode code) : this(code, code.GetDescription()) { }