major advanced

* add support for writes
* add support for accept
* handle closes during a select()