On 1/29/20 12:14 AM, Milo Turner wrote:
Hello all,

I'm wondering if it's possible to open a unix domain socket with SOCK_SEQPACKET in Racket? It looks like currently unix-socket-lib uses SOCK_STREAM, and doesn't allow you to configure that flag. Is there a reason for this, or would it be a good idea to add this feature to the unix-socket-lib library? I would rather not issue the C FFI calls myself, because non-blocking IO is fairly difficult to do correctly from my previous impressions with it.

SOCK_SEQPACKET sockets don't match Racket's port interface, which doesn't have a notion of message boundaries, so you'd have to work around that interface mismatch. Also, the unix-socket library reuses Racket's implementation of ports backed by file descriptors. To support SOCK_SEQPACKET, it would need a different implementation of read and write that preserved message boundaries.

So it would be possible, but it's a fair amount of work, and no one seems to have really needed SOCK_SEQPACKET support yet.

Ryan

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/29dc31f9-4443-ff74-241f-45dfa8c581c2%40ccs.neu.edu.

Reply via email to