private static Stream OpenStream(HttpWebRequest req) { Socket sock = OpenSocket(req); if (req.isSecured) { #if CONFIG_SSL SecureConnection secured = new SecureConnection(); /*TODO: suspected memory hold for SecureConnection */ Stream retval = secured.OpenStream(sock); return(retval); #else throw new NotSupportedException(S._("NotSupp_SSL")); #endif } else { return(new NetworkStream(sock, true)); } }
private static Stream OpenStream(HttpWebRequest req) { Socket sock=OpenSocket(req); if(req.isSecured) { #if CONFIG_SSL SecureConnection secured=new SecureConnection(); /*TODO: suspected memory hold for SecureConnection */ Stream retval=secured.OpenStream(sock); return retval; #else throw new NotSupportedException(S._("NotSupp_SSL")); #endif } else { return new NetworkStream(sock,true); } }