check the size of data received or send
use non-blocking send() and recv() method