Re: FILE* behaviour over BSD sockets - how?
From: Aurelian Melinte (amelinte_at_b504-12.info.polymtl.ca)
Date: 05/13/04
- Next message: Darko M.: "Re: FILE* behaviour over BSD sockets - how?"
- Previous message: Aurelian Melinte: "Re: FILE* behaviour over BSD sockets - how?"
- In reply to: Søren Hansen: "Re: FILE* behaviour over BSD sockets - how?"
- Next in thread: Darko M.: "Re: FILE* behaviour over BSD sockets - how?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 13 May 2004 14:37:21 GMT
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?
>
Yes, fdopen succeeds on sockets
- Next message: Darko M.: "Re: FILE* behaviour over BSD sockets - how?"
- Previous message: Aurelian Melinte: "Re: FILE* behaviour over BSD sockets - how?"
- In reply to: Søren Hansen: "Re: FILE* behaviour over BSD sockets - how?"
- Next in thread: Darko M.: "Re: FILE* behaviour over BSD sockets - how?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|