nix-rust / nix

Rust friendly bindings to *nix APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`sendmmsg` documentation is incorrect

kalradivyanshu opened this issue · comments

https://docs.rs/nix/latest/nix/sys/socket/fn.sendmmsg.html is incorrect. The doc says that sendmmsg takes 3 arguments:

Arguments

  • fd: Socket file descriptor
  • data: Struct that implements IntoIterator with SendMmsgData items
  • flags: Optional flags passed directly to the operating system.

But it takes 6? And as far as I can tell SendMmsgData doesn't exist anymore? I would love a working example of how to use sendmmsg.

Thanks!

sendmmsg is notoriously hard to use, and hard to bind in Rust. Nix has been through a few different versions. @pacak @rtzoeller could you please take a look?

commented

Derp. I totally forgot to update the documentation when updating sendmmsg. Now there's also #2038 that changes sendmmsg a bit more....

commented

Updated the docs in #2038 a bit, at least now it doesn't contradict to the type signature.