database64128/shadowsocks-go

Is ShadowStreamReader's ReadZeroCopy method really zerocopy?

Closed this issue · 2 comments

I'm learning to use zerocopy in go, and I found this awesome project. But when I going deep on the source code of zerocopy package, I can not find related code about zerocopy, am I wrong ?
Thank you!

What kind of zerocopy are you aiming for? The purpose of the zerocopy package in this project is to provide a set of interfaces that help minimizing copying between different components. The outcome is that, for typical configurations, there is no copying of payload happening in userspace.

If you are talking about SO_ZEROCOPY and MSG_ZEROCOPY, I'm afraid this project does not support these.

What kind of zerocopy are you aiming for? The purpose of the zerocopy package in this project is to provide a set of interfaces that help minimizing copying between different components. The outcome is that, for typical configurations, there is no copying of payload happening in userspace.

If you are talking about SO_ZEROCOPY and MSG_ZEROCOPY, I'm afraid this project does not support these.

Ok, I get it now, thanks!