In C does the function inet_pton() convert only the ip address from printble to string format or it also converts ip address and port number too? I mean, if I have a string of format A.B.C.D:E where A.B.C.D is the ip and E is the port number, would I be able to use inet_pton for the same?
Share
No, it does not handle port numbers. The man page specifies exactly what it expects for IPv4 addresses: