uSockets icon indicating copy to clipboard operation
uSockets copied to clipboard

Ability to get remote port

Open elan opened this issue 3 years ago • 3 comments

Is there a reason there's no us_socket_remote_port to sit alongside us_socket_remote_address? Perhaps I'm missing something and there's another way to obtain that data.

elan avatar Jan 12 '22 21:01 elan

us_socket_remote_address is there so adding us_socket_remote_port is welcome. Nobody has requested such a function before. You want to know the ephemeral port?

ghost avatar Jan 16 '22 08:01 ghost

yeah, just to be able to key a remote connection based on remote address and port, e.g.

elan avatar Jan 16 '22 09:01 elan

us_socket_local_port and us_socket_remote_address should be replaced with functions that return both IP and port in one go.

us_socket_local_address and us_socket_remote_address are better names

ghost avatar Jan 16 '22 10:01 ghost

Is there a reason there's no us_socket_remote_port

I added it in PR.

Jacob-Burckhardt avatar Oct 16 '23 23:10 Jacob-Burckhardt