-
Notifications
You must be signed in to change notification settings - Fork 190
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
Add support for AF_UNIX SOCK_DGRAM #602
base: master
Are you sure you want to change the base?
Conversation
CircleCI caught this:
Edit: fixed by moving the |
0b681ac
to
6286c5d
Compare
Unfortunately these aren't supported by libuv directly, so we need to implement our own separate system. It doesn't need to be particularly scalable as the expected use-case is to send and receive ethernet frames. The server will listen on a Unix domain socket and receive connected SOCK_DGRAM sockets which will have ethernet frames on them. Signed-off-by: David Scott <[email protected]>
6286c5d
to
df53b9f
Compare
@@ -7,3 +7,9 @@ val rtlGenRandom: int -> bytes option | |||
|
|||
val setSocketTTL: Unix.file_descr -> int -> unit | |||
(** [setSocketTTL s ttl] sets the TTL on the socket [s] to [ttl] *) | |||
|
|||
val cstruct_send: Unix.file_descr -> Cstruct.t -> int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really would prefer to get these stubs into Cstruct_unix. It seems safe enough to put these alongside Cstruct_unix.of_fd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah makes sense, I'm about to write writev
and readv
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately these aren't supported by libuv directly, so we need to implement our own separate system. It doesn't need to be particularly scalable as the expected use-case is to send and receive ethernet frames.
The server will listen on a Unix domain socket and receive connected SOCK_DGRAM sockets which will have ethernet frames on them.
Signed-off-by: David Scott [email protected]