开发者

how do i get the Port from an in_addr value?

开发者 https://www.devze.com 2022-12-09 17:41 出处:网络
I am trying to extract the port from a given in_addr value in windows. So far I am able to get the 开发者_如何学GoIP address using inet_ntoa but not the port.

I am trying to extract the port from a given in_addr value in windows.

So far I am able to get the 开发者_如何学GoIP address using inet_ntoa but not the port.

Thanks.


You do not: it is only an IP address

Perhaps you mean to use sockaddr which contains this information, when applicable.

0

精彩评论

暂无评论...
验证码 换一张
取 消