Types
BufferStream = ref object of Connection readQueue*: AsyncQueue[seq[byte]] readBuf*: StreamSeq pushing*: bool reading*: bool pushedEof*: bool returnedEof*: bool
- Source Edit
Consts
BufferStreamTrackerName = "BufferStream"
- Source Edit
Procs
proc len(s: BufferStream): int {....raises: [], tags: [].}
- Source Edit
proc new(T: typedesc[BufferStream]; timeout: Duration = DefaultConnectionTimeout): T:type {. ...raises: [].}
- Source Edit
func shortLog(s: BufferStream): auto {....raises: [], tags: [].}
- Source Edit
Methods
method atEof(s: BufferStream): bool {....raises: [], tags: [].}
- Source Edit
method closeImpl(s: BufferStream): InternalRaisesFuture[void, void] {. stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit
method initStream(s: BufferStream) {....raises: [], tags: [TimeEffect, RootEffect].}
- Source Edit
method pushData(s: BufferStream; data: seq[byte]): InternalRaisesFuture[void, (CancelledError, LPStreamError)] {.base, stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
-
Write bytes to internal read buffer, use this to fill up the buffer with data.
pushTo will block if the queue is full, thus maintaining backpressure.
Source Edit method pushEof(s: BufferStream): InternalRaisesFuture[void, (CancelledError, LPStreamError)] {.base, stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit
method readOnce(s: BufferStream; pbytes: pointer; nbytes: int): InternalRaisesFuture[ int, (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Source Edit
Templates
template formatItIMPL(it: BufferStream): auto
- Source Edit
Exports
-
DNS_OR_IP, shortLog, init, random, UDP_DNS, $, <=, MaError, ephemeral, MaPatternOp, ==, WS_DNS, initVBuffer, getProtoHeader, MaxSizeError, ProtoHeader, ProtoFlags, getLen, ECDHEScheme, shortLog, init, init, closed, [], decode, macOpenArray, random, init, VBuffer, Secret, peekVarint, random, $, validate, init, bytes, maxInlineKeyLength, TranscoderDNS, QUIC, [], ephemeral, withValue, getRequiredField, getField, init, supported, WS_IP, safeConvert, public, MAKind, write, peekSeq, init, checkFieldNumber, valueOr, init, getRepeatedField, matchPartial, libp2p_pki_schemes, getBytes, len, readLp, HTTP, initVBuffer, atEof, LPStreamTrackerName, write, toOpt, fullAddrs, payloadType, getProtoHeader, LPStreamError, init, decode, IP, protoAddress, newRng, DefaultConnectionTimeout, ==, withValue, checkValid, mac, getPublicKey, exceptionToAssert, WebSockets, CircuitRelay, extractPublicKey, mapAnd, new, verify, UDP_IP, new, newLPStreamEOFError, ==, DNSADDR, AddressMapper, init, write, PeerId, WSS, LPStream, TCP_IP, close, writePacked, init, init, closeImpl, readSeq, toBytes, TCP_DNS, shortLog, encode, len, capLen, init, protoName, toRawBytes, mapOr, $, initProtoBuffer, init, WSS_DNS, match, writeLPVarint, CryptoResult, parseFullAddress, ProtoResult, WebRTCDirect, UDP, TranscoderOnion, StreamTracker, write, init, LPStreamResetError, isEmpty, writeArray, decode, LPStreamIncompleteError, [], LPStreamEOFError, IP6, shortLog, initVBuffer, PKScheme, finish, toString, payload, init, stretchKeys, Connection, write, DNSANY, TCP, PrivateKey, getBytes, write, init, &=, PeerInfoError, hash, newLPStreamClosedError, random, write, compilesOr, TranscoderIP4, initProtoBuffer, toException, DNS, UTP, goffset, getRawBytes, >, KeyPair, init, high, init, cmp, init, SupportedWireTypes, formatItIMPL, formatItIMPL, formatItIMPL, Signature, contains, formatItIMPL, toBytes, DigestSheme, IPFS, getField, readOnce, isEmpty, ProtoScalar, shortLog, data, hex, protocols, HTTPS, len, LPError, getPtr, write, TLS_WS, sign, init, encode, update, MaResult, key, ProtoField, init, toBytes, writeSeq, init, &, DNS6, IpTransportProtocol, toOpenArray, init, IP4, TranscoderPort, isEnough, getBytes, getField, init, >=, readVarint, payloadDomain, $, MaPattern, withValue, init, LPStreamLimitError, TranscoderOnion3, SignedPayload, toBytes, protoArgument, newLPStreamLimitError, keyOpenArray, match, WebSockets_DNS, $, isEmpty, writeLp, getRequiredRepeatedField, init, newLPStreamIncompleteError, initProtoBuffer, MAProtocol, newLPStreamResetError, getPackedRepeatedField, initStream, init, getField, shortLog, DNS4, getWrapped, readArray, selectBest, write, P2PPattern, Envelope, hasPublicKey, toException, init, isEnough, init, readVarint, Reliable, addrs, hex, ProtoBuffer, closeImpl, write, WS, encode, init, getField, match, <, iv, readLine, Eof, CryptoError, getField, hash, append, vsizeof, init, parseFullAddress, WSS_IP, LPStreamConnDownError, peekArray, UNIX, PeerRecord, SupportedSchemes, getRepeatedField, getField, Unreliable, SupportedSchemesInt, random, checkFutures, shuffle, validate, $, protoCode, mapEq, getField, Onion3, write, TcpOnion3, concat, TranscoderP2P, PeerInfo, AddressInfo, ConnectionTrackerName, TranscoderIP6, finish, write, EnvelopeError, hash, encode, newLPStreamRemoteClosedError, TranscoderIP6Zone, MaPatResult, Direction, InvalidVarintError, shortLog, items, ==, write, getBytes, write, init, init, init, PublicKey, WebSockets_IP, writeLp, writePBVarint, ProtoFieldKind, readExactly, protoArgument, getRepeatedField, ProtoError, newLPStreamConnDownError, init, initStream, getField, MultiAddress, ivOpenArray, closeWithEOF, TimeoutHandler, orError, getField, LPStreamRemoteClosedError, MaInvalidAddress, LPStreamClosedError, RsaDefaultKeySize, write, getOrder, TranscoderUnix, SignedPeerRecord, join, writeVarint