u16 netTxFree (u8 socketNum)
|socketNum : The socket number (0~3)|
|Returns the number of available bytes in the transmit buffer|
Gets the number of available bytes in the transmit buffer for socket, socketNum.
When the netSend and netPrint fuctions are used, the data to be sent is stored in the socket's transmit buffer, to be transmitted by the Ethernet Module. However, the CPU is much faster than the typical Ethernet network and can sometimes fill the buffer before the Ethernet Module can transmit it on the network. Therefore, it is wise to check if there is room in the transmit buffer before calling netSend or netPrint.
The transmit buffer is 2KB(2048 bytes), so if this function returns 2048, the entire buffer is free and there is no data waiting to be sent.