httpsocketsclientfilehandlezig

Does Zig's HTTP client allow you to get access to the file descriptor for the socket?


It's not clear if Zig exposes the filehandle descriptor for the socket in client.request.reader()? Does it? And if so how do you get access to it?


Solution

  • From truemedian,

    Short answer: no

    Long answer: yes, if you're willing to depend on implementation details client.connection.?.data.stream.handle.

    Source: https://github.com/orhun/zig-http-benchmarks/issues/16