Send the buffer to remote server via TCP connection with specified id.
NF_STATUS nf_tcpPostSend(ENDPOINT_ID id, const char * buf, int len)


Connection identifier
Pointer to data buffer
Buffer length

Return Values

NF_STATUS_SUCCESS on success, or other NF_STATUS error code on fail.


The library splits the buffer to packets and tries to send them to remote server via specified connection. The method NF_EventHandler::tcpCanSend is called when the internal packet buffer is empty. The function always returns NF_STATUS_SUCCESS after buffering the data. To optimize the usage of memory split the large buffers to chunks and send each chunk after receiving tcpCanSend. There is no need to wait for tcpCanSend before sending the first chunk.

If len is zero, the driver initiates a controlled disconnect for the specified TCP connection. The driver aborts the connection in case if NF_EventHandler::tcpSend with zero len was not yet called.


Driver type WFP, TDI
Header nfapi.h
Library nfapi.lib