Allows the same socket to be shared amongst TCP,WS,WSS transports.
---------
Co-authored-by: sukun <sukunrt@gmail.com>
Co-authored-by: Marco Munizaga <git@marcopolo.io>
* pass an event bus to the swarm constructor
* make the eventbus parameter a required swarm constructor parameter
* emit Connectedness notifications from the swarm
* remove peer connectedness watchers from hosts
* swarm: emit connectedness events when holding the mutex
* docs: remove documentation indicating that mplex is enabled by default
* feat: expose yamux ID as a constant
* feat: expose mplex ID as a constant
* reword muxer config documentation
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* quic: add an integration test for QUIC version support
* quic: refactor the stateless reset test
* quic: simplify the interface of the noreuseConn
DecreaseCount now closes the underlying UDP conn, so that callers don't
need to pay attention if they're dealing with a reuseConn or a
noreuseConn.
* implement a quicreuse to manage QUIC connections
* quicreuse: introduce options
* config: construct the quicreuse.ConnManager using fx
* webtransport: use the quicreuse
* add integration test for QUIC and WebTranport sharing the same UDP addr
* Handle errors in accept loop goroutine
* Add comment
* Remove todo
* Rename mutexes
* Cleanup extra close
* Only log on err
* Use webtransport-go 0.4.0
* Fix expected error
Co-authored-by: Marco Munizaga <git@marcopolo.io>
* Add Resolver interface to transport
* Move resolve test to swarm_dial_test
* Use proper peer id in test
* Only import go-multiaddr once
* Cleanup
* Use SNI in websocket
* Update go-multiaddr
* Update p2p/net/swarm/swarm.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* PR comments on websocket.go
* Use unresolved/resolved map
* Set sni
* Refactor websocket multiaddr parsing code, add server test
* Delete superflous helpers
* Update callsites
* Fix typo in p2p/transport/websocket/websocket.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* Fix flaky timing dependent tests
* Update go-libp2p-peerstore dependency
* Register notifiee synchronously
* Only a single connection
* Remove WaitForDisconnectNotification hack since notifs are now synchronous
* Add debug logging to identify tests
* Close chan once
Removes:
* go-libp2p-conn logic (moved to transports)
* go-libp2p-peerstream (moved here)
Changes:
* New transport interface.
* Explicit over implicit (the implicit automagic now all lives in go-libp2p):
* No more default transports, muxers, etc.
* No more fallback dialer. Transports are now *required*.
* Stream opening:
* Connection picking logic (instead of just picking the first).
* Tries harder to open a stream of some connections happen to be closed.
* Stream closing:
* No longer treats half-closed streams as fully closed. Users *must* read the
an EOF or reset the stream for it to be garbage collected.
* No more polling for dead connections.
* Multiplexers are now *non-optional*. Really, they haven't been optional for a
while but we still pretended that they were.
* No more Network type alias. It added a bunch of code and didn't really provide
anything but an alternative set of methods that do the same thing.
* Notifications:
* New guarantee: connection open notifications will complete before connection
close notifications begin.
* Given that, notifications are now delivered in parallel. No more
notification backlogs blocking connection closing/opening.