Sun Java System Web Server 6.1 SP7 NSAPI Programmer's Guide

net_flush

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

Syntax

int net_flush(SYS_NETFD sd);

Returns

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

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, net_sendfile