discuss-gnustep
[Top][All Lists]
Advanced

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

Re: writeData: does not send out data for 5-10 minutes


From: Andreas Höschler
Subject: Re: writeData: does not send out data for 5-10 minutes
Date: Tue, 20 Sep 2005 10:31:12 +0200

Hello Chris,

You mean the data (n bytes) is actually sent by machineA and also
received by machineB but NSFileHandleReadCompletionNotification is not
posted until at least N (N > n) bytes have been received?
If anyhow possible I would like to use the NSFileHandle notification
mechanism versus polling for available data.
Can the timeout be reduced?

I'm not familiar with using NSFileHandle for a TCP oder UDP socket (though
essentially a socket is a file, I prefer to differ between those two).

From a socket's point of view, you can use setsockopt() to reduce or
increase the timeout for sending/receiving.

Maybe, just maybe, you could use NSFileHandle-synchronizeFile to flush the
buffer. But as I said, I do not use NSFileHandle on sockets.
Richard might tell you, though.

I have checked the GNUstep sources and as far as I understand them NSFileHandle-synchronizeFile has no effect on sockets:

- (void) synchronizeFile
{
  if (isStandardFile)
    {
#if defined(__MINGW__)
      (void)_commit(descriptor);
#else
      (void)sync();
#endif
    }
}

Anyway, thanks!

Regards,

 Andreas






reply via email to

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