-
Notifications
You must be signed in to change notification settings - Fork 18
Add SOCK_SEQPACKET support #23
Comments
Servo's ipc-channel uses SEQPACKET sockets which might provided some inspiration on the implementation. The API's probably going to be a bit weird due to the need to indicate packet boundaries. |
Aren't usual traits Each I.e. existing code can happen to work even if substitute Alternatively reuse part of API from |
Ah, I was expecting Seems like an API similar to |
Just came here to enter an issue for seqpacket :) Yea, SEQPACKET's API semantics are connection oriented like stream, but datagram oriented. In my testing, on Linux I have found that seqpacket connections support either the send or the sendmsg functions. So it can be treated basically as a stream API, with the understanding that payloads are never sent via multiple messages. Looking at the lib, we could probably get away with just adding an option or an alternate constructor to UnixStream. Whether the consensus is to make a UnixSeqpacket struct and factor out the common functionality, I am happy to implement either. |
I think it'd make more sense as a separate |
I forgot one rather important thing, this PR depends upon rust/libc PR rust-lang/libc#300 Since libc doesn't presently contain SOCK_SEQPACKET |
Obviously, sequential packet sockets should support #4 and #5.
They also have listener/connection, unlike datagram sockets.
The text was updated successfully, but these errors were encountered: