do not forget to set O_NONBLOCK / TCP_NDELAY