[wplug] socket function
Weber, Lawrence A
laweber at switch.com
Thu Sep 4 10:51:03 EDT 2008
I am working with some simple socket code and found the call:
inet_addr(argv[2], &myServer.sin.s_addr);
The manual for inet_addr() says that it only takes one argument, the
input string. The function inet_aton() takes 2 args, the input string
and structure destination.
The original code seems to work, but I don't know why. When I replace
inet_addr with inet_aton the code compiles but does not work.
I also checked the header file and it agrees with the manual.
Any ideas why does inet_addr compile without warnings/errors (and work)
and why doesn't inet_aton work?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.wplug.org/pipermail/wplug/attachments/20080904/ec95f4bd/attachment.html
More information about the wplug
mailing list