peek methods for UnixDatagram and UnixStream? #68565
Labels
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
#38980 added
peek
andpeek_from
methods forUdpSocket
, and addedpeek
toTcpStream
.Would it be possible to add the
peek
andpeek_from
methods toUnixDatagram
as well, and to add thepeek
method toUnixStream
?I would also be interested in having a Linux extension method for
UnixDatagram
that calls recv withMSG_PEEK | MSG_TRUNC
, to block until the next packet is available and return the length of that packet. Perhapsnext_packet_len()
? (Doing that is possible on some other platforms via different methods, but some platforms can't do it at all without just reading and buffering the pending packet viaMSG_PEEK
with increasingly large buffers.)The text was updated successfully, but these errors were encountered: