-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
effort/daysEstimated to take multiple days, but less than a weekEstimated to take multiple days, but less than a weekexp/intermediatePrior experience is likely helpfulPrior experience is likely helpfulkind/architectureCore architecture of projectCore architecture of project
Description
@Stebalien suggested to replace the AddHandler
(which gets passed a callback) with a Listen(... protocol.ID)
function, returning a Listener
, on which an Accept
method could be called to accept streams.
This would be a more idiomatic approach, as it closely mirrors how net.Conn
s and streams are accepted. It would also move the go routine handling to the application, which is arguably the place where it belongs.
Metadata
Metadata
Assignees
Labels
effort/daysEstimated to take multiple days, but less than a weekEstimated to take multiple days, but less than a weekexp/intermediatePrior experience is likely helpfulPrior experience is likely helpfulkind/architectureCore architecture of projectCore architecture of project