Ejemplo n.º 1
0
static inline
void on_write(uv_write_t* req, int status)
{
	TcpConnection::UvWriteData* write_data = static_cast<TcpConnection::UvWriteData*>(req->data);
	TcpConnection* connection = write_data->connection;

	// Delete the UvWriteData struct (which includes the uv_req_t and the store char[]).
	std::free(write_data);

	// Just notify the TcpConnection when error.
	if (status)
		connection->onUvWriteError(status);
}