bsl::basic_syncbuf::sync

Request a flush on the next emit, optionally emitting now.

Synopsis

Declared in <bslstl_syncbuf.h>

int
sync() override;

Description

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.

Return Value

0 on success, or -1 if emit failed