public HttpConnection(IMyStream myStream, EPPair epPair, NaiveHttpServer server) { this.baseStream = myStream.ToStream(); this.myStream = myStream; this.server = server; this.epPair = epPair; }
public static HttpConnection CreateHttpConnectionFromMyStream(IMyStream myStream, NaiveHttpServer httpSvr) { EPPair epPair; if (myStream is SocketStream ss) { epPair = ss.EPPair; } else { // use fake eppair epPair = new EPPair(new IPEndPoint(IPAddress.Loopback, 1), new IPEndPoint(IPAddress.Loopback, 2)); } return(new HttpConnection(myStream.ToStream(), epPair, httpSvr)); }