Sun Java System Web Server 7.0 Update 3 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.


int net_flush(SYS_NETFD sd);

Return Values

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


SYS_NETFD sd is the socket to flush.


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

See Also

net_write() Function, net_sendfile() Function