コード例 #1
0
                // MustClose closes Closer c and calls log.Fatal if it returns a non-nil error.
                public static void MustClose(io.Closer c)
                {
                    {
                        var err = c.Close();

                        if (err != null)
                        {
                            log.Fatal(err);
                        }
                    }
                }
コード例 #2
0
 public clientCodec(ref ptr <json.Decoder> dec = default, ref ptr <json.Encoder> enc = default, io.Closer c = default, clientRequest req = default, clientResponse resp = default, sync.Mutex mutex = default, map <ulong, @string> pending = default)
 {
     this.dec     = dec;
     this.enc     = enc;
     this.c       = c;
     this.req     = req;
     this.resp    = resp;
     this.mutex   = mutex;
     this.pending = pending;
 }
コード例 #3
0
 public Archive(ArchiveHeader ArchiveHeader = default, slice <ptr <Member> > Members = default, io.Closer closer = default)
 {
     this.m_ArchiveHeaderRef = new ptr <ArchiveHeader>(ArchiveHeader);
     this.Members            = Members;
     this.closer             = closer;
 }
コード例 #4
0
 public transferWriter(@string Method = default, io.Reader Body = default, io.Closer BodyCloser = default, bool ResponseToHEAD = default, long ContentLength = default, bool Close = default, slice <@string> TransferEncoding = default, Header Header = default, Header Trailer = default, bool IsResponse = default, error bodyReadError = default, bool FlushHeaders = default, channel <readResult> ByteReadCh = default)
 {
     this.Method           = Method;
     this.Body             = Body;
     this.BodyCloser       = BodyCloser;
     this.ResponseToHEAD   = ResponseToHEAD;
     this.ContentLength    = ContentLength;
     this.Close            = Close;
     this.TransferEncoding = TransferEncoding;
     this.Header           = Header;
     this.Trailer          = Trailer;
     this.IsResponse       = IsResponse;
     this.bodyReadError    = bodyReadError;
     this.FlushHeaders     = FlushHeaders;
     this.ByteReadCh       = ByteReadCh;
 }
コード例 #5
0
 public serverCodec(ref ptr <json.Decoder> dec = default, ref ptr <json.Encoder> enc = default, io.Closer c = default, serverRequest req = default, sync.Mutex mutex = default, ulong seq = default, map <ulong, ptr <json.RawMessage> > pending = default)
 {
     this.dec     = dec;
     this.enc     = enc;
     this.c       = c;
     this.req     = req;
     this.mutex   = mutex;
     this.seq     = seq;
     this.pending = pending;
 }
コード例 #6
0
 public File(FileHeader FileHeader = default, slice <ptr <Section> > Sections = default, slice <ptr <Symbol> > Symbols = default, slice <byte> StringTable = default, slice <@string> LibraryPaths = default, io.Closer closer = default)
 {
     this.m_FileHeaderRef = new ptr <FileHeader>(FileHeader);
     this.Sections        = Sections;
     this.Symbols         = Symbols;
     this.StringTable     = StringTable;
     this.LibraryPaths    = LibraryPaths;
     this.closer          = closer;
 }
コード例 #7
0
 public bufWriter(io.Closer closer = default, ref ptr <bufio.Writer> Writer > = default)
 {
     this.closer   = closer;