2014-07-04 16:42 GMT+02:00 Claudio Bisegni <[email protected]>: > void TCPUVServer::on_write_end(uv_write_t *req, int status) { > > TCPUVServerLDBG << "on_write_end "; > > //delete the sent data > > chaos::common::data::SerializationBuffer *ser = > static_cast<chaos::common::data::SerializationBuffer*>(req->data); > > if(ser) delete(ser); > > if (status) { > > TCPUVServerLERR << "error on_write_end:" << status; > > } > > uv_close((uv_handle_t*)req->handle, TCPUVServer::on_close); > > free(req); > > } > > > on_write_end is the last step on my protocollo (create a server-> accept > more socket for every connection i read and write the ack and the i close > the connection).
> is on_write_end method well managed the on_close method do the free action. Indeed you can call uv_close on any handle callback. -- Iñaki Baz Castillo <[email protected]> -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/libuv. For more options, visit https://groups.google.com/d/optout.
