Re: recv() problem?
- From: Rick Jones <rick.jones2@xxxxxx>
- Date: Tue, 10 Jan 2006 21:54:10 GMT
Steve Horsley <steve.horsley@xxxxxxxxx> wrote:
> David Schwartz wrote:
>> "Steve Horsley" <steve.horsley@xxxxxxxxx> wrote in message
>> news:dq0478$mbk$1@xxxxxxxxxxxxxxxxxxxxxxxx
>>> michal.shmueli@xxxxxxxxx wrote:
>>
>>> Well, it looks like you signify the end of the server response by closing
>>> the connection,
>>
>> Where did you get that from? It didn't look like that to me at all.
>> Nothing the OP said suggested this.
> From here:
> /**********************************
> SENDS THE OUPUT
> ***********************************/
> if (send(new_fd, rdata1, MAX, 0) == -1){
> //error
> }
> close(new_fd);
> exit(0);
> I thought that either close() or exit() would do the trick.
> Am I so rusty that I'm missing something?
Nope - that should indeed cause the remote to get a read return of
zero, indicating close of connection and, by implication, end of
response. Of course, it isn't a "perfect" end of response indication
since one could get a read return of zero if the server application
crashed :)
rick jones
--
firebug n, the idiot who tosses a lit cigarette out his car window
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
.
- Follow-Ups:
- Re: recv() problem?
- From: FLY135
- Re: recv() problem?
- References:
- recv() problem?
- From: michal . shmueli
- Re: recv() problem?
- From: Steve Horsley
- Re: recv() problem?
- From: David Schwartz
- Re: recv() problem?
- From: Steve Horsley
- recv() problem?
- Prev by Date: Re: Linux Console Hangs
- Next by Date: Re: linux 2.6.15 breaks route to outside world?
- Previous by thread: Re: recv() problem?
- Next by thread: Re: recv() problem?
- Index(es):
Relevant Pages
|