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?
The Uring
accept
API returns the file descriptor for the accepted socket inresult:int
as part ofHowever, since the type of
Unix.file_descr
is abstract, it's unusable with the Unix module API's. My work around is to just useObj.magic
to convert it to thefile_descr
type, but is this the correct usage pattern?