User Tools

Site Tools

한국어

moacon:nettxfree:index

netTxFree

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.

Network sample program

go MOACON home

moacon/nettxfree/index.txt · Last modified: 2016/04/14 11:07 (external edit)