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
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep