-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: Change the listener type for the Loop function.
Instead of taking a net.Listener, which is hard to implement outside the net package because of the complexity of the net.Conn it returns, define a local Accepter interface that returns a Channel directly. Since the Accepter is now responsible for building the channel, the Framing option is no longer needed. To make it easier to update existing use, add a NetAccepter function that adapts a net.Listener and a framing to the new Accepter interface. This is a breaking API change in the server package.
- Loading branch information
1 parent
33541d1
commit 31ce9d5
Showing
2 changed files
with
30 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters