discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: socket losing data


From: Marko Riedel
Subject: Re: socket losing data
Date: Sat, 3 May 2008 00:22:30 +0200 (CEST)

Hi folks,

false alarm -- the problem had nothing to do with the underlying socket,
but was due to a content-length http header having the wrong value,
causing the server to expect more data than was actually being sent.

Furthermore, in the loop that I initially mailed to the list, I created
lots of autoreleased NSData objects, which would not be collected until
the exit from the method. I changed this to use read, write and a
statically allocated char buffer for performance reasons, so that there is
never more space allocated than what you need for one chunk of data.

Best regards,

Marko Riedel




--- "hns@computer.org" <hns@computer.org> schrieb


> I would try
> 
> [fileHandle synchronizeFile];
> 
> which should "push" all internal buffers to the network (but does NOT
> denote end of data to the peer - so the peer TCP/IP stack may buffer
> and NOT deliver to its application).
> 
> and
> 
> [fileHandle closeFile];
> 
> which is described to notify end of communication.
> 
> -- hns
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnustep
> 


+-------------------------------------------------------------+
| Marko Riedel, EDV Neue Arbeit gGmbH, markoriedelde@yahoo.de |
| http://www.geocities.com/markoriedelde/index.html           |
+-------------------------------------------------------------+


      E-Mails jetzt auf Ihrem Handy.
www.yahoo.de/go




reply via email to

[Prev in Thread] Current Thread [Next in Thread]