FILE* behaviour over BSD sockets - how?
From: Aurelian Melinte (amelinte_at_b504-12.info.polymtl.ca)
Date: 05/12/04
- Next message: Nick Landsberg: "Re: Concurrency Issues"
- Previous message: Bill Marcum: "Re: automatic signal that a file is ready to read"
- Next in thread: Rich Teer: "Re: FILE* behaviour over BSD sockets - how?"
- Reply: Rich Teer: "Re: FILE* behaviour over BSD sockets - how?"
- Reply: David Schwartz: "Re: FILE* behaviour over BSD sockets - how?"
- Reply: Barry Margolin: "Re: FILE* behaviour over BSD sockets - how?"
- Reply: Alexander Krisak: "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: Wed, 12 May 2004 18:21:19 GMT
Hello,
I am looking to make a socket behave like a FILE*.
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.
Do not see any solution...
Regards,
a.
- Next message: Nick Landsberg: "Re: Concurrency Issues"
- Previous message: Bill Marcum: "Re: automatic signal that a file is ready to read"
- Next in thread: Rich Teer: "Re: FILE* behaviour over BSD sockets - how?"
- Reply: Rich Teer: "Re: FILE* behaviour over BSD sockets - how?"
- Reply: David Schwartz: "Re: FILE* behaviour over BSD sockets - how?"
- Reply: Barry Margolin: "Re: FILE* behaviour over BSD sockets - how?"
- Reply: Alexander Krisak: "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 ]