Subject | Re: [IB-Architect] Interbase connection limit and Support related Problems |
---|---|
Author | Jan Mikkelsen |
Post date | 2000-07-06T23:10:56Z |
Jim Starkey <jas@...> wrote:
read(2) and write(2). You do not have to use a socket specific call with
socket handles.
The reason they don't work with read and write on Win32 is that read and
write are C runtime library functions, and there is a mapping layer for
handles so that the Unix style constants for stdin, stdout and stderr (0, 1,
2) work with read/write. Win32 does not guarantee the actual handle values
for standard streams.
Oh, and Unix typically allocates fds sequentially. Think dup(2) for
reassigning standard streams, not to mention bit vectors.
is not broken in the way you suggest. What is Interbase doing using C
stdio, anyway?
Jan Mikkelsen
>Sockets are indeed handles, no question. But they don't workSockets handles work with ReadFile and WriteFile, the Win32 equivalents of
>with read/write, only socket specific send/recv (this from personal
>experience). Unlike Unix fds, they are allocated sequentially.
>Also, on NT, the fd_set data structure is an array of handles
>which is searched, while on Unix it is a dense bit vector directly
>accessed.
read(2) and write(2). You do not have to use a socket specific call with
socket handles.
The reason they don't work with read and write on Win32 is that read and
write are C runtime library functions, and there is a mapping layer for
handles so that the Unix style constants for stdin, stdout and stderr (0, 1,
2) work with read/write. Win32 does not guarantee the actual handle values
for standard streams.
Oh, and Unix typically allocates fds sequentially. Think dup(2) for
reassigning standard streams, not to mention bit vectors.
>But there are implementation details. The important point is thatWhile Solaris may have a broken C runtime library, the operating system API
>NT, unlike Solaris, does not have an API induced limit on the number
>of sockets supported. This is not to say that are not limits, but
>they are internal to NT and hence can be stretched by the whim of
>Brother Bill.
is not broken in the way you suggest. What is Interbase doing using C
stdio, anyway?
Jan Mikkelsen