mirror of
https://github.com/vacp2p/nim-libp2p-experimental.git
synced 2025-01-13 03:44:26 +00:00
5b28e8c488
* count published messages * don't call `switch.dial` in `subscribeToPeer` * don't use delegation in connection * move connection out to own file * don't breakout on reset * make sure to call close on secured conn * add lpstream tracing * don't breackdown by conn id * fix import * remove unused lable * reset connection on exception * add additional metrics for skipped messages * check for nil in secure.close
26 lines
636 B
Nim
26 lines
636 B
Nim
import chronos
|
|
|
|
import ../libp2p/transports/tcptransport
|
|
import ../libp2p/stream/bufferstream
|
|
import ../libp2p/stream/lpstream
|
|
|
|
const
|
|
StreamTransportTrackerName = "stream.transport"
|
|
StreamServerTrackerName = "stream.server"
|
|
|
|
trackerNames = [
|
|
# ConnectionTrackerName,
|
|
BufferStreamTrackerName,
|
|
TcpTransportTrackerName,
|
|
StreamTransportTrackerName,
|
|
StreamServerTrackerName
|
|
]
|
|
|
|
iterator testTrackers*(extras: openArray[string] = []): TrackerBase =
|
|
for name in trackerNames:
|
|
let t = getTracker(name)
|
|
if not isNil(t): yield t
|
|
for name in extras:
|
|
let t = getTracker(name)
|
|
if not isNil(t): yield t
|