sustrik / libdill

Structured concurrency in C
MIT License
1.68k stars 156 forks source link

Are there the flush operation for sockets? #193

Closed Hirrolot closed 5 years ago

Hirrolot commented 5 years ago

Has LibDill the flush operation for stream-based sockets? In other words, how can I send all remaining data in a sending buffer to a remote endpoint?

sustrik commented 5 years ago

You don't have to. It's done automatically.

Hirrolot commented 5 years ago

So LibDill hasn't got a sending buffer, all the data is written to a destination at the moment it was accepted by bsend(), bsendl() functions?

sustrik commented 5 years ago

Yes. That's the case.

It would be nice to add that, but I would like to avoid exlicit flush. AFAICS it can be done by automatically flushing when the tx buffer is full AND when scheduler has no other work to schedule.

Hirrolot commented 5 years ago

Thank you