Use select for write timeout checking