libp2p.network.connection package
Submodules
libp2p.network.connection.exceptions module
- exception libp2p.network.connection.exceptions.RawConnError
Bases:
IOException
libp2p.network.connection.net_connection_interface module
- class libp2p.network.connection.net_connection_interface.INetConn
Bases:
Closer
- event_started: Event
- abstract get_streams() Tuple[INetStream, ...]
- muxed_conn: IMuxedConn
- abstract async new_stream() INetStream
libp2p.network.connection.raw_connection module
- class libp2p.network.connection.raw_connection.RawConnection(stream: ReadWriteCloser, initiator: bool)
Bases:
IRawConnection
- async read(n: int | None = None) bytes
Read up to
n
bytes from the underlying stream. This call is delegated directly to the underlyingself.reader
.Raise RawConnError if the underlying connection breaks
- stream: ReadWriteCloser
libp2p.network.connection.raw_connection_interface module
- class libp2p.network.connection.raw_connection_interface.IRawConnection
Bases:
ReadWriteCloser
A Raw Connection provides a Reader and a Writer.
libp2p.network.connection.swarm_connection module
- class libp2p.network.connection.swarm_connection.SwarmConn(muxed_conn: IMuxedConn, swarm: Swarm)
Bases:
INetConn
- event_closed: Event
- muxed_conn: IMuxedConn