Skip to content

file descriptor returned by Uring.accept is unusable #117

@koonwen

Description

@koonwen

The Uring accept API returns the file descriptor for the accepted socket in result:int as part of

 type 'a completion_option =
  | None
  | Some of { result: int; data: 'a }

However, since the type of Unix.file_descr is abstract, it's unusable with the Unix module API's. My work around is to just use Obj.magic to convert it to the file_descr type, but is this the correct usage pattern?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions