Function EventDriverPipes.write
Writes data from a stream socket.
Note that only a single write operation is allowed at once. The caller
needs to make sure that either on_write_finish
got called, or
cancelWrite
was called before issuing the next call to write
.