Request a flush on the next emit, optionally emitting now.
Declared in <bslstl_syncbuf.h>
int
sync() override;
Request the wrapped streambuf flush on the next emit call, then call emit if the "emit-on-sync" flag is true. Return 0 on success and -1 if the emit call has failed.
0 on success, or -1 if emit failed