示例#1
0
 public expectContinueReader(ref ptr <response> resp = default, io.ReadCloser readCloser = default, bool closed = default, atomicBool sawEOF = default)
 {
     this.resp       = resp;
     this.readCloser = readCloser;
     this.closed     = closed;
     this.sawEOF     = sawEOF;
 }
 public maxBytesReader(ResponseWriter w = default, io.ReadCloser r = default, long n = default, error err = default)
 {
     this.w   = w;
     this.r   = r;
     this.n   = n;
     this.err = err;
 }
示例#3
0
 public http2gzipReader(http2incomparable _ = default, io.ReadCloser body = default, ref ptr <gzip.Reader> zr = default, error zerr = default)
 {
     this._    = _;
     this.body = body;
     this.zr   = zr;
     this.zerr = zerr;
 }
示例#4
0
 public reader(flate.Reader r = default, io.ReadCloser decompressor = default, hash.Hash32 digest = default, error err = default, array <byte> scratch = default)
 {
     this.r            = r;
     this.decompressor = decompressor;
     this.digest       = digest;
     this.err          = err;
     this.scratch      = scratch;
 }
 public bodyEOFSignal(io.ReadCloser body = default, sync.Mutex mu = default, bool closed = default, error rerr = default, Func <error, error> fn = default, Func <error> earlyCloseFn = default)
 {
     this.body         = body;
     this.mu           = mu;
     this.closed       = closed;
     this.rerr         = rerr;
     this.fn           = fn;
     this.earlyCloseFn = earlyCloseFn;
 }
 public checksumReader(io.ReadCloser rc = default, hash.Hash32 hash = default, ulong nread = default, ref ptr <File> f = default, io.Reader desr = default, error err = default)
 {
     this.rc    = rc;
     this.hash  = hash;
     this.nread = nread;
     this.f     = f;
     this.desr  = desr;
     this.err   = err;
 }
示例#7
0
 public Reader(Header Header = default, flate.Reader r = default, io.ReadCloser decompressor = default, uint digest = default, uint size = default, array <byte> buf = default, error err = default, bool multistream = default)
 {
     this.m_HeaderRef  = new ptr <Header>(Header);
     this.r            = r;
     this.decompressor = decompressor;
     this.digest       = digest;
     this.size         = size;
     this.buf          = buf;
     this.err          = err;
     this.multistream  = multistream;
 }
示例#8
0
 public Response(@string URL = default, @string Status = default, long StatusCode = default, map <@string, slice <@string> > Header = default, io.ReadCloser Body = default, error fileErr = default, errorDetailBuffer errorDetail = default)
 {
     this.URL         = URL;
     this.Status      = Status;
     this.StatusCode  = StatusCode;
     this.Header      = Header;
     this.Body        = Body;
     this.fileErr     = fileErr;
     this.errorDetail = errorDetail;
 }
示例#9
0
 // NewReader creates a new ReadCloser.
 // Reads from the returned ReadCloser read and decompress data from r.
 // If r does not implement io.ByteReader, the decompressor may read more
 // data than necessary from r.
 // It is the caller's responsibility to call Close on the ReadCloser when done.
 //
 // The ReadCloser returned by NewReader also implements Resetter.
 public static (io.ReadCloser, error) NewReader(io.Reader r)
 {
     io.ReadCloser _p0 = default;
     error         _p0 = default !;
示例#10
0
 public response(ref ptr <conn> conn = default, ref ptr <Request> req = default, io.ReadCloser reqBody = default, context.CancelFunc cancelCtx = default, bool wroteHeader = default, bool wroteContinue = default, bool wants10KeepAlive = default, bool wantsClose = default, atomicBool canWriteContinue = default, sync.Mutex writeContinueMu = default, ref ptr <bufio.Writer> w = default, chunkWriter cw = default, Header handlerHeader = default, bool calledHeader = default, long written = default, long contentLength = default, long status = default, bool closeAfterReply = default, bool requestBodyLimitHit = default, slice <@string> trailers = default, atomicBool handlerDone = default, array <byte> dateBuf = default, array <byte> clenBuf = default, array <byte> statusBuf = default, channel <bool> closeNotifyCh = default, int didCloseNotify = default)
 {
     this.conn             = conn;
     this.req              = req;
     this.reqBody          = reqBody;
     this.cancelCtx        = cancelCtx;
     this.wroteHeader      = wroteHeader;
     this.wroteContinue    = wroteContinue;
     this.wants10KeepAlive = wants10KeepAlive;
     this.wantsClose       = wantsClose;
     this.canWriteContinue = canWriteContinue;
     this.writeContinueMu  = writeContinueMu;
     this.w                   = w;
     this.cw                  = cw;
     this.handlerHeader       = handlerHeader;
     this.calledHeader        = calledHeader;
     this.written             = written;
     this.contentLength       = contentLength;
     this.status              = status;
     this.closeAfterReply     = closeAfterReply;
     this.requestBodyLimitHit = requestBodyLimitHit;
     this.trailers            = trailers;
     this.handlerDone         = handlerDone;
     this.dateBuf             = dateBuf;
     this.clenBuf             = clenBuf;
     this.statusBuf           = statusBuf;
     this.closeNotifyCh       = closeNotifyCh;
     this.didCloseNotify      = didCloseNotify;
 }
示例#11
0
 public cancelTimerBody(Action stop = default, io.ReadCloser rc = default, Func <bool> reqDidTimeout = default)
 {
     this.stop          = stop;
     this.rc            = rc;
     this.reqDidTimeout = reqDidTimeout;
 }
示例#12
0
 public errorDetailBuffer(io.ReadCloser r = default, strings.Builder buf = default, long bufLines = default)
 {
     this.r        = r;
     this.buf      = buf;
     this.bufLines = bufLines;
 }
示例#13
0
文件: dump.cs 项目: zjmit/go2cs
 // drainBody reads all of b to memory and then returns two equivalent
 // ReadClosers yielding the same bytes.
 //
 // It returns an error if the initial slurp of all bytes fails. It does not attempt
 // to make the returned ReadClosers have identical error-matching behavior.
 private static (io.ReadCloser, io.ReadCloser, error) drainBody(io.ReadCloser b)
 {
     io.ReadCloser r1  = default;
     io.ReadCloser r2  = default;
     error         err = default !;
示例#14
0
 public ServerConn(sync.Mutex mu = default, net.Conn c = default, ref ptr <bufio.Reader> r = default, error re = default, error we = default, io.ReadCloser lastbody = default, long nread = default, long nwritten = default, map <ptr <http.Request>, ulong> pipereq = default, textproto.Pipeline pipe = default)
 {
     this.mu       = mu;
     this.c        = c;
     this.r        = r;
     this.re       = re;
     this.we       = we;
     this.lastbody = lastbody;
     this.nread    = nread;
     this.nwritten = nwritten;
     this.pipereq  = pipereq;
     this.pipe     = pipe;
 }
示例#15
0
 public Request(@string Method = default, ref ptr <url.URL> URL = default, @string Proto = default, long ProtoMajor = default, long ProtoMinor = default, Header Header = default, io.ReadCloser Body = default, Func <(io.ReadCloser, error)> GetBody = default, long ContentLength = default, slice <@string> TransferEncoding = default, bool Close = default, @string Host = default, url.Values Form = default, url.Values PostForm = default, ref ptr <multipart.Form> MultipartForm = default, Header Trailer = default, @string RemoteAddr = default, @string RequestURI = default, ref ptr <tls.ConnectionState> TLS = default, channel <object> Cancel = default, ref ptr <Response> Response = default, context.Context ctx = default)
示例#16
0
 public Response(@string Status = default, long StatusCode = default, @string Proto = default, long ProtoMajor = default, long ProtoMinor = default, Header Header = default, io.ReadCloser Body = default, long ContentLength = default, slice <@string> TransferEncoding = default, bool Close = default, bool Uncompressed = default, Header Trailer = default, ref ptr <Request> Request = default, ref ptr <tls.ConnectionState> TLS = default)
 {
     this.Status           = Status;
     this.StatusCode       = StatusCode;
     this.Proto            = Proto;
     this.ProtoMajor       = ProtoMajor;
     this.ProtoMinor       = ProtoMinor;
     this.Header           = Header;
     this.Body             = Body;
     this.ContentLength    = ContentLength;
     this.TransferEncoding = TransferEncoding;
     this.Close            = Close;
     this.Uncompressed     = Uncompressed;
     this.Trailer          = Trailer;
     this.Request          = Request;
     this.TLS = TLS;
 }
示例#17
0
 public transferReader(Header Header = default, long StatusCode = default, @string RequestMethod = default, long ProtoMajor = default, long ProtoMinor = default, io.ReadCloser Body = default, long ContentLength = default, bool Chunked = default, bool Close = default, Header Trailer = default)
 {
     this.Header        = Header;
     this.StatusCode    = StatusCode;
     this.RequestMethod = RequestMethod;
     this.ProtoMajor    = ProtoMajor;
     this.ProtoMinor    = ProtoMinor;
     this.Body          = Body;
     this.ContentLength = ContentLength;
     this.Chunked       = Chunked;
     this.Close         = Close;
     this.Trailer       = Trailer;
 }
示例#18
0
 public readTrackingBody(io.ReadCloser ReadCloser = default, bool didRead = default)
 {
     this.ReadCloser = ReadCloser;
     this.didRead    = didRead;
 }
 public pooledFlateReader(sync.Mutex mu = default, io.ReadCloser fr = default)
 {
     this.mu = mu;
     this.fr = fr;
 }