I have a couple of questions about socket programming that have to do with recv.

I know there is a way to peek at data before it comes in by some flag or something, but should I always just make a buffer with a decent size so that I don't need to worry about it?

Also, many of my programs after they receive something trigger a send. Is it needed to send on it's own thread so that if data comes in recv won't miss it?

Really what it comes down to is that I don't know exactly how recv works. Will data just pile up until I read it through recv? I don't know if data is lost if you don't recv it immediately.