Talk:Getaddrinfo

Code examples
The code for the getaddrinfo client is aweful! —The preceding unsigned comment was added by 207.47.10.130 (talk • contribs).


 * I've removed the long code examples per WP:NOT. -- intgr 09:46, 4 April 2007 (UTC)

Expansion and new code
All previous code was bad for encyclopedic use. It was wrong too, since the hostname buffer was already at maximum allowed size and reallocs were unnecessary. NI_MAXHOST isn't mentioned in RFCs anymore because it's not a restriction in the addrinfo API, but originates from the name server implementation, . Expanded the article with the sister function getnameinfo and freeaddrinfo and added prototype definitions. Sample code now shows the power of returning multiple results, however, stays away from detailed requests via hints and flags. A redirect from nonexistent getnameinfo to this article was also created. Kbrose (talk) 20:19, 14 December 2008 (UTC)

Long example removed

 * [Section moved from User talk:intgr]

Hi,

I've been attempting to add sample code to getaddrinfo because the code there is useless. My edit has been reverted twice. The revert comments go something along the lines of "Wikipedia is an encyclopedia, not a code repository/programming contest."

I repeat, THE EXAMPLE CODE ON THE PAGE IS USELESS. I'm trying to improve the content of the page by adding a code sample which shows the proper/intended usage of getaddrinfo.

Since you were the last to revert the page, would you be so kind as to let me know what I can do to insure the new code sample sticks?

Thanks, Reubenhwk (talk) 20:37, 8 December 2010 (UTC)


 * I haven't looked into the current code in detail, but seems to demonstrate the API &mdash; that's all it's supposed to do. It compiles and runs on my computer. It's not supposed to be a useful program for any practical purpose. If you have good reasons, you can delete it as well, I won't object to that.
 * As for the code that you're trying to add, sorry. Even if it's better or more correct, it is too long and complicated. You can add an external link and host the code elsewhere, but that monster just doesn't belong on Wikipedia. -- intgr [talk] 21:24, 8 December 2010 (UTC)


 * The bar is set too low: " seems to demonstrate the API &mdash; that's all it's supposed to do." Good job.  — Preceding unsigned comment added by Reubenhwk (talk • contribs) 23:11, 8 December 2010 (UTC)