liburing icon indicating copy to clipboard operation
liburing copied to clipboard

No way to do `getsockname()` for a direct socket

Open ned14 opened this issue 9 months ago • 8 comments

I have an io_uring based application where I am debugging socket connections between server and client. Printing the port which the client is using to connect is a reasonable way to map between server and client.

Unfortunately, io_uring provides no equivalent to getsockname() as far as I can tell for sockets connected using io_uring_prep_connect() with IOSQE_FIXED_FILE where there is no userspace file descriptor available.

I appreciate that this is a very minor corner case, but I make the suggestion for this feature addition anyway.

ned14 avatar Feb 25 '25 20:02 ned14