mirror of
https://github.com/curl/curl.git
synced 2026-07-24 19:17:20 +03:00
ip_quadruple/proxy: make port uint16_t
Make `port` member in these struct of type `uint16_t`. add `uint8_t transport` to `struct ip_quadruple Define TRNSPRT_NONE as 0. By assigning a valid transport only on a successful connection, it is clear when the ip_quadruple members are valid. Also, for transports not involving ports, the getinfos for `CURLINFO_PRIMARY_PORT` and `CURLINFO_LOCAL_PORT` will now always return -1. Make all `transport` members and parameters of type `uint8_t`. Document the return value of `CURLINFO_LOCAL_PORT` and `CURLINFO_PRIMARY_PORT` in this regard. Add tests that writeout stats report ports correctly. Closes #19708
This commit is contained in:
parent
feea968512
commit
c4f29cc508
20 changed files with 104 additions and 80 deletions
|
|
@ -35,6 +35,9 @@ connection done with this **curl** handle.
|
|||
If the connection was done using QUIC, the port number is a UDP port number,
|
||||
otherwise it is a TCP port number.
|
||||
|
||||
If no connection was established or if the protocol does not use ports, -1
|
||||
is returned.
|
||||
|
||||
# %PROTOCOLS%
|
||||
|
||||
# EXAMPLE
|
||||
|
|
|
|||
|
|
@ -36,6 +36,11 @@ If a proxy was used for the most recent transfer, this is the port number of
|
|||
the proxy, if no proxy was used it is the port number of the most recently
|
||||
accessed URL.
|
||||
|
||||
If the connection was done using QUIC, the port number is a UDP port number.
|
||||
|
||||
If no connection was established or if the protocol does not use ports, -1
|
||||
is returned.
|
||||
|
||||
# %PROTOCOLS%
|
||||
|
||||
# EXAMPLE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue