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/sys/unix: sendmsg does not permit sending multiple buffers #9402

Closed
eapache opened this issue Dec 19, 2014 · 4 comments
Closed

x/sys/unix: sendmsg does not permit sending multiple buffers #9402

eapache opened this issue Dec 19, 2014 · 4 comments

Comments

@eapache
Copy link

eapache commented Dec 19, 2014

(I realize syscall has moved to its own repo as of 1.4, but that repo doesn't have a bug tracker so I assume this is still the right place to file such things, please correct me if I'm wrong.)

The unix Sendmsg and SendmsgN system calls permit passing in multiple buffers through the use of an io-vector structure, however the Go wrappers for these functions take only a single []byte and hard-code the length of the io-vector to 1. It would be very useful for performance in some cases (such as IBM/sarama#238) if Sendmsg could be made to take a [][]byte and construct the equivalent io-vector.

@minux minux changed the title syscall: sendmsg does not permit sending multiple buffers sys/unix: sendmsg does not permit sending multiple buffers Dec 19, 2014
@minux minux added the repo-sys label Dec 19, 2014
@mikioh mikioh changed the title sys/unix: sendmsg does not permit sending multiple buffers unix: sendmsg does not permit sending multiple buffers Jan 4, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title unix: sendmsg does not permit sending multiple buffers x/sys/unix: sendmsg does not permit sending multiple buffers Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-sys label Apr 14, 2015
@minux
Copy link
Member

minux commented Jul 10, 2020

We can't change the existing functions, but how about introducing this?

func SendmsgMultiple(fd int, p [][]byte, oob []byte, to Sockaddr, flags int) (n int, err error)

Any suggestions for a better name?

@ianlancetaylor
Copy link
Contributor

GIven the existence of net.Buffers, perhaps we can do something along the lines of SendmsgBuffers. Not that we should import "net", but we could add a Buffers type to x/sys/unix. I'm not quite sure that makes sense, though.

@dpifke
Copy link
Contributor

dpifke commented Nov 22, 2022

Superseded by #52885?

@ianlancetaylor
Copy link
Contributor

Yes, thanks.

@ianlancetaylor ianlancetaylor closed this as not planned Won't fix, can't repro, duplicate, stale Nov 23, 2022
@golang golang locked and limited conversation to collaborators Nov 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants