in reply to POE: how to flush io?

Johnnywang,
There is a good post here from the author of POE rcaputo that might give you a few ideas.

Regards Paul