Closed DailyMats closed 6 years ago
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.
If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!
I have signed the CLA.
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
@yfeldblum I've reduced the amount of defines that are sprinkled around, and changed to modern initialization of the tcpinfo
member (which is the only change outside of the __APPLE__
ifdefs).
On macOS, the
tcp_connection_info
struct provides almost the same information as thetcp_info
struct on Linux and FreeBSD. With the help of a couple of#ifdef
s, this pull request makes thetcpinfo
field inwangle::TransportInfo
available on macOS as well.To further simplify getting the TCP state through
tcpinfo.tcpi_state
(which is my main motivation for doing this), I've added#ifdef
s for the macOS valuesTCPS_*
to the Linux/FreeBSDTCP_*
macros.