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

x/net/nettest: add TestListener API #31036

Open
mdlayher opened this issue Mar 25, 2019 · 6 comments
Open

x/net/nettest: add TestListener API #31036

mdlayher opened this issue Mar 25, 2019 · 6 comments

Comments

@mdlayher
Copy link
Member

I'm currently implementing my own net.Listener (see also #30984 and #31033), https://godoc.org/github.com/mdlayher/vsock#Listener, and would like to ensure it is in full compliance with the net.Listener contract; that is:

I've played around with this a bit locally to try to see what makes sense, and I will send a draft CL with my proposed API and a single test. The basic idea is to mirror what TestConn is doing, and perhaps the two can share a fair bit of internal code.

/cc @dsnet @mikioh @acln0

@gopherbot gopherbot added this to the Proposal milestone Mar 25, 2019
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/169177 mentions this issue: nettest: draft implementation of TestListener APIs

@mikioh
Copy link
Contributor

mikioh commented Mar 25, 2019

@mdlayher
Copy link
Member Author

I had no idea this was already in progress. I'll take a look tomorrow.

@mikioh
Copy link
Contributor

mikioh commented Mar 25, 2019

I still need to process long-standing CLs and that's one of them, sorry for my laziness. Basically, making x/net/nettest useful sounds nice because we are entering the modular era; vendoring x/net/nettest could deduplicate the test harnesses in the package net of the standard library.

@mdlayher
Copy link
Member Author

Happy to help with that effort.

@rsc
Copy link
Contributor

rsc commented Apr 24, 2019

This seems fine to add to x/net/nettest. Will leave to @mikoh and @mdlayher to work out the review of CL 123056. Thanks!

@rsc rsc changed the title proposal: x/net/nettest: add TestListener API x/net/nettest: add TestListener API Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants