If I set a socket to non-blocking, what does that mean exactly? If I do a read, it will immediately return? Is there some callback function that will get called if I do that? (I'd love it if it worked like that)...

It basically means that a call to receiveBytes() may return a negative return value, denoting that no data is available. You'll usually use select() or poll() get wait until data becomes available. The details are a bit more complicated; refer to Stevens or the Socket FAQ.