Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom net.Listener #155

Closed
Davincible opened this issue Nov 23, 2022 · 3 comments · Fixed by #162
Closed

Allow custom net.Listener #155

Davincible opened this issue Nov 23, 2022 · 3 comments · Fixed by #162
Assignees
Labels
enhancement New feature or request

Comments

@Davincible
Copy link

My problem with the current API is the Start method, as it only takes an address string. I understand the convenience of this, but would also really like a function to pass a custom net.Listener. So essentially I'm asking for something like exposing s.handleListener().

A current workaround could probably be to manually implement that method, but it's a bit of a hack.

@Davincible Davincible added the enhancement New feature or request label Nov 23, 2022
@ShivanshVij
Copy link
Member

I think that’s a fair request. I’ll take a look tomorrow to see if there’s an obvious way to do this.

For now, there is a ‘ServeConn’ method you can use - just create an accept loop and call ServeConn on the accepted connection.

@Davincible
Copy link
Author

@ShivanshVij thanks!

@ShivanshVij
Copy link
Member

Closed as part of v0.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants