This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I have to read a response from a TCP Socket's Input Stream. But I dont know the number of bytes that are coming in response. There is a function called available() that gives the number of bytes available in the stream, but its not reliable, it works some time and sometime not. I also tried to read data till I found "-1" which marks the end of the stream but this is also not working beacuse I think at the server end streams are not getting closed that why I am not getting "-1". Please Help.