libp2p/protocols/connectivity/relay/relay

    Dark Mode
Search:
Group by:
  Source   Edit

Types

Relay = ref object of LPProtocol
  switch*: Switch
  peerCount: CountTable[PeerId]
  maxCircuit*: int
  maxCircuitPerPeer*: int
  msgSize*: int
  isCircuitRelayV1*: bool
  streamCount: int
  rsvp: Table[PeerId, DateTime]
  reservationLoop: Future[void]
  reservationTTL*: times.Duration
  heartbeatSleepTime*: uint32
  limit*: Limit
  Source   Edit
RelayV2Error = object of LPError
  Source   Edit

Consts

DefaultLimitData = 131072
  Source   Edit
DefaultReservationTTL = (seconds: 3600, nanosecond: 0)
  Source   Edit
MaxCircuit = 128
  Source   Edit
RelayMsgSize = 4096
  Source   Edit

Procs

proc handleHop(r: Relay; connSrc: Connection; msg: RelayMessage): Future[void] {.
    ...gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [],
    tags: [RootEffect].}
  Source   Edit
proc handleHopStreamV2(r: Relay; conn: Connection): Future[void] {....gcsafe,
    stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [],
    tags: [RootEffect].}
  Source   Edit
proc isRelayed(conn: Connection): bool {....raises: [], tags: [].}
  Source   Edit
proc new(T: typedesc[Relay];
         reservationTTL: times.Duration = DefaultReservationTTL;
         limitDuration: uint32 = DefaultLimitDuration;
         limitData: uint64 = DefaultLimitData;
         heartbeatSleepTime: uint32 = DefaultHeartbeatSleepTime;
         maxCircuit: int = MaxCircuit;
         maxCircuitPerPeer: int = MaxCircuitPerPeer;
         msgSize: int = RelayMsgSize; circuitRelayV1: bool = false): T:type {.
    ...raises: [].}
  Source   Edit
proc setup(r: Relay; switch: Switch) {....raises: [], tags: [RootEffect].}
  Source   Edit

Methods

method start(r: Relay): Future[void] {.stackTrace: false, ...gcsafe, raises: [],
                                       raises: [], raises: [],
                                       tags: [RootEffect].}
  Source   Edit
method stop(r: Relay): Future[void] {.stackTrace: false, ...gcsafe, raises: [],
                                      raises: [], raises: [], tags: [RootEffect].}
  Source   Edit