Agreed. TCP has nothing to do with the data get actually sent.
I have another question related to the options being set to the socket
during socket initialization.
I did not find any other way to set TCP_NODELAY to 1. I had to put these
lines into the source code:
int flag = 1;
int result = setsockopt(socketFD, IPPROTO_TCP, TCP_NODELAY, (char
*)&flag, sizeof(int));
if (result == -1) {
NSString *reason = @"Could Not Disable Nagle...";
err = [[self errnoErrorWithReason:reason] retain];
close(socketFD);
return SOCKET_NULL;
}
Personally I prefer to have a getter which provides me with the socket
structure or some call back function getting invoked during socket
initialization.
Have I missed something?