Sun Java System Web Server 7.0 Update 7 NSAPI Developer's Guide

net_flush() Function

The net_flush function flushes any buffered data. If you require that data be sent immediately, call net_flush after calling the network output functions such as net_write or net_sendfile.

Syntax

int net_flush(SYS_NETFD sd);

Return Values

0 on success, or a negative value if an error occurs.

Parameters

SYS_NETFD sd is the socket to flush.

Example

net_write(sn->csd, "Please wait... ", 15);
net_flush(sn->csd);
/* Perform some time-intensive operation */
...
net_write(sn->csd, "Thank you.\n", 11);

See Also

net_write() Function, net_sendfile() Function