Re: MSDN page for "socket"
- From: "Eugene Gershnik" <gershnik@xxxxxxxxxxx>
- Date: Mon, 30 Jan 2006 10:55:14 -0800
Norman Diamond wrote:
> Page
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/socket_2.asp
> says:
>> Parameters
>> af
>> [in] Address family specification.
>
> But it gives no instructions on how to find a list of valid values.
Yet another MSDN bug. There are plenty of them out there and all other
platform docs (Unix man pages, Java documentation) have a lot of bugs too.
You can try to be a good citizen and report them or just live with them. ;-)
[...]
> It seems there are two ways to code programs using sockets. One is
> to do copying and pasting from previously written code. One is to
> read Linux manual pages.
Actually there are 4 ways. The third is to get a good book on socket
programming. The fourth is to use Internet ;-)
> But beware, the select() function doesn't
> do enough under Windows as it does under Linux (in Linux you can
> select() both a socket and the keyboard in order to respond to
> whichever input comes first).
Because on Linux select() is just a general OS API. Windows has a different
IO model which should be used if you want to mix sockets and other file
objects. The Winsock select is just an attempt to be compatible with BSD
sockets, not a POSIX implementation.
BTW if you want to have complete Unix compatibility, Cygwin or SFU provide
just that including select() that works for everything.
> Anyway, MSDN still needs much
> improvement in this area.
So do Linux man pages (not to mention Solaris ones which are even worse) ;-)
The bottom line is that developers don't like to write docs. Any API
documentation supplied by them will miss info and have bugs. If you want a
manual a book written by a dedicated writer is a better choice.
--
Eugene
http://www.gershnik.com
.
- References:
- MSDN page for "socket"
- From: Norman Diamond
- MSDN page for "socket"
- Prev by Date: Re: WSAWaitForMultipleEvents vs. WaitForMultipleObjectsEx vs. RegisterWaitForSingleObject
- Next by Date: Re: IPC in C#
- Previous by thread: Re: MSDN page for "socket"
- Next by thread: Re: MSDN page for "socket"
- Index(es):
Relevant Pages
|