Re: FILE* behaviour over BSD sockets - how?
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 05/13/04
- Next message: Barry Margolin: "Re: FILE* behaviour over BSD sockets - how?"
- Previous message: Konstantin Sorokin: "Re: automatic signal that a file is ready to read"
- In reply to: Søren Hansen: "Re: FILE* behaviour over BSD sockets - how?"
- Next in thread: Søren Hansen: "Re: FILE* behaviour over BSD sockets - how?"
- Reply: Søren Hansen: "Re: FILE* behaviour over BSD sockets - how?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 13 May 2004 12:30:30 -0400
In article <pan.2004.05.13.09.29.54.973678@warma.dk>,
Søren Hansen <sh@warma.dk> wrote:
> On Wed, 12 May 2004 18:21:19 +0000, Aurelian Melinte wrote:
>
> > The problem: I have to use a library (which I cannot modify) with an
> > API reading/writing records to FILE*. The data I have to read comes
> > through a socket. The socket has been set to blocking and I successfully
> > fdopen(socket). However, the API reads once in a while incomplete records
> > because the underlying socket calls seem to return as soon as there is a
> > packet to read but not when the whole requested number of bytes has been
> > read.
>
> I've never tried using it on sockets, but perhaps fdopen() will do the
> trick?
That's precisely what he said he's doing -- see the 4th line of the text
you quoted.
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Next message: Barry Margolin: "Re: FILE* behaviour over BSD sockets - how?"
- Previous message: Konstantin Sorokin: "Re: automatic signal that a file is ready to read"
- In reply to: Søren Hansen: "Re: FILE* behaviour over BSD sockets - how?"
- Next in thread: Søren Hansen: "Re: FILE* behaviour over BSD sockets - how?"
- Reply: Søren Hansen: "Re: FILE* behaviour over BSD sockets - how?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|