/// <summary> /// Parse a HTTP header after sending it through the TCP channel /// </summary> /// <returns>A parsed version of <param>rq_line</param></returns> /// <remarks> /// This method must be called between Setup() and TearDown(). /// </remarks> public static HttpRequestLine ParseHttpRequestLine(string rq_line) { byte[] to_send = System.Text.Encoding.ASCII.GetBytes(rq_line); var es = new EchoSocket(bUseIPv6, to_send); using (var hs = new HttpSocket(es.socket)) { es.socket.Shutdown(SocketShutdown.Send); return new HttpRequestLine(hs); } }
/// <summary> /// Parse a HTTP header after sending it through the TCP channel /// </summary> /// <returns>A parsed version of <param>header</param></returns> /// <remarks> /// This method must be called between Setup() and TearDown(). /// </remarks> public static HttpHeaders ParseHttpHeaders(string header) { byte[] to_send = System.Text.Encoding.ASCII.GetBytes(header); var es = new EchoSocket(bUseIPv6, to_send); using (var hs = new HttpSocket(es.socket)) { es.socket.Shutdown(SocketShutdown.Send); return new TrotiNet.HttpHeaders(hs); } }
/// <summary> /// Parse a HTTP header after sending it through the TCP channel /// </summary> /// <returns>A parsed version of <param>rq_line</param></returns> /// <remarks> /// This method must be called between Setup() and TearDown(). /// </remarks> static public HttpRequestLine ParseHttpRequestLine(string rq_line) { byte[] to_send = System.Text.Encoding.ASCII.GetBytes(rq_line); var es = new EchoSocket(bUseIPv6, to_send); using (var hs = new HttpSocket(es.socket)) { es.socket.Shutdown(SocketShutdown.Send); return(new HttpRequestLine(hs)); } }
/// <summary> /// Parse a HTTP header after sending it through the TCP channel /// </summary> /// <returns>A parsed version of <param>header</param></returns> /// <remarks> /// This method must be called between Setup() and TearDown(). /// </remarks> static public HttpHeaders ParseHttpHeaders(string header) { byte[] to_send = System.Text.Encoding.ASCII.GetBytes(header); var es = new EchoSocket(bUseIPv6, to_send); using (var hs = new HttpSocket(es.socket)) { es.socket.Shutdown(SocketShutdown.Send); return(new TrotiNet.HttpHeaders(hs)); } }