public static HttpDatagram Parse(byte [] rawDgram) { if (rawDgram.Length <= 0) { return(null); } int headers_offset = 0; HttpDatagramType type = DetectDatagramType(rawDgram, out headers_offset); if (type == HttpDatagramType.Unknown) { return(null); } HttpDatagram dgram = new HttpDatagram(type); if (ParseHeaders(dgram, rawDgram, headers_offset)) { return(dgram); } return(null); }
public HttpDatagram(HttpDatagramType type) { this.type = type; }
public HttpDatagram (HttpDatagramType type) { Type = type; }
public HttpDatagram(HttpDatagramType type) { Type = type; }