Wolfram Research, Inc.
int MLFlush(MLINK link) flushes out any buffers containing data waiting to be sent on link.
If you call MLNextPacket() or any of the MLGet*() functions, then MLFlush() will be called automatically.
If you call MLReady(), then you need to call MLFlush() first in order to ensure that any necessary outgoing data has been sent.
See The Mathematica Book: Section 2.12.14.
See also: MLReady.