GT Kim
GT Kim

Reputation: 339

Can the uv_write() send a large amount of data at one time?

For example, my buffer to send has 20K bytes (user lists).

I wonder if uv_write() can send the 20K bytes at once, not sepearted. So will the callback function, after_write_cb, returns the status 0 of success?

That is, Don't I need to care about the leftover while sending?

Upvotes: 0

Views: 618

Answers (1)

saghul
saghul

Reputation: 2010

You can pass megabyte sized buffers to uv_write if you want, libuv will only call the write callback after all data has been sent.

Upvotes: 1

Related Questions