libuv / help

Need help with libuv? Post your question here.
28 stars 7 forks source link

question about uv_read_start! #149

Closed bitraft closed 4 years ago

bitraft commented 4 years ago

Will onAlloc exec again before onRead callback ?

I mean if the last onAlloc is not full filled and notify by onRead callback, cloud it be call again ?

for example:

1 .  onAlloc return 1024 buffer
2.  onRead accept 1000 byte
3.  onAlloc call again because more data sent by peer ?  

I guess it should first execute onRead with 24byte, then exec onAlloc again.

bitraft commented 4 years ago

I find it from docs: each onAlloc call onRead once.