Just a quick question about recv() - sorry, I swear I found it on google earlier but I can't remember exactly what the search string was.

Since you can't (afaik) know the length of the data to be received from the server I was going to use an STL vector so I can push_back() single bytes as I read them, but I don't know what recv() returns (if at all) when there's nothing left to return from the server so I can break the loop I plan to use.

Tips?