mdlayher / vsock

Package vsock provides access to Linux VM sockets (AF_VSOCK) for communication between a hypervisor and its virtual machines. MIT Licensed.
MIT License
336 stars 65 forks source link

vsock: Go 1.12 runtime network poller integration #25

Closed mdlayher closed 5 years ago

mdlayher commented 5 years ago

It isn't clear to me how close we are to having this already done, but as of Go 1.12, we should be able to create:

For the gist of how to do this, see: https://github.com/mdlayher/raw/commit/f434146a17ecdf185e28b9ae8457ef45ee82077a. I don't currently have an easy way to test this package, but perhaps I can get my hypervisor setup back up and running to do some verification of any required changes in a few days.

Or perhaps, everything will just work! We'll see.

I don't immediately have time to work on this, but I suspect folks who are using this in their projects will take a great interest in making timeouts work and providing added efficiency to their applications. :)

/cc @aybabtme @mxpv @pmorjan

mdlayher commented 5 years ago

Ping @aybabtme, @mxpv, and @pmorjan; I am curious if you have deployed this package with Go 1.12 in your environments.

pmorjan commented 5 years ago

@mdlayher I use 1.12 with your package and I'm totally happy with it. But I'm using it only at a commit before Accept() has changed. I still think Accept() should behave the same as other Accept methods in the std library and block. I guess most use cases are like this: listener. But I really don't want to complain. Also I currently don't use the timeout feature. Thanks.

mdlayher commented 5 years ago

@pmorjan my understanding is that with the changes made to 1.12, Accept should be blocking again. If it isn't, we should fix that. Can you confirm?

pmorjan commented 5 years ago

@mdlayher 1.12 does not make any difference. 4b12813 is the last commit where Accept blocks. fda437ec and later Accept does not block.

mdlayher commented 5 years ago

Confirmed here too. It would appear there's some work to be done yet. I'll start investigating.