-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
difficulty:moderatepriority:importantThe changes needed are critical for libp2p, or are blocking another projectThe changes needed are critical for libp2p, or are blocking another project
Description
If the connection upgrade only accepts one protocol, we can optimize the multistream-select process by assuming that it works, and closing the connection/substream altogether if later the remote returns "na".
I would suggest modifying dialer_select_proto so that if the size_hint() of the protocols list returns a maximum of 1, immediately succeed after sending the data without waiting for the remote to confirm, and wraps around the returned stream.
The behaviour should also be precisely documented.
Metadata
Metadata
Labels
difficulty:moderatepriority:importantThe changes needed are critical for libp2p, or are blocking another projectThe changes needed are critical for libp2p, or are blocking another project