Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
Adding doc about Closable Transport.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorropo committed Aug 31, 2020
1 parent b77fd28 commit afacbc7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions transport/transport.go
Expand Up @@ -54,6 +54,15 @@ type CapableConn interface {
// CapableConn, which means that they have been upgraded to support
// stream multiplexing and connection security (encryption and authentication).
//
// If your transport implements `io.Closer` Close will be called when libp2p
// closes.
//
// Close need to be threadsafe with Dial and Listen.
// You might receive calls to Dial or Listen even once closed, they should
// error.
//
// If Close return an error the transport is still considered as dead.
//
// For a conceptual overview, see https://docs.libp2p.io/concepts/transport/
type Transport interface {
// Dial dials a remote peer. It should try to reuse local listener
Expand Down

0 comments on commit afacbc7

Please sign in to comment.