Instructions

267 C-Control Pro IDE
© 2013 Conrad Electronic
5.11.12 ETH_ListenUDP
Ethernet Functions
Syntax
word ETH_ListenUDP(word port);
Sub ETH_ListenUDP(port As Word) As Word
Description
Opens a listening socket on a TCP port. Received packets are stored in the buffer that was initialized with
ETH_SetConnBuf.
Parameter
port UDP Port
Return Parameter
handle to UDP listening Socket, 0 in case of error
5.11.13 ETH_ReceiveData
Ethernet Functions
Syntax
void ETH_ReceiveData(byte buf[], word len);
Sub ETH_ReceiveData(ByRef buf As Byte, len As Word)
Description
Saves a packet from the Ethernet receive buffer to address buf. The len parameter can be smaller
than the length of the packet data, the remaining bytes of the packet are discarded. If you want to
discard the whole packet data, set len to zero.
Parameter
buf Arrayvariable in that the buffer data is stored
len number of bytes that are copied
5.11.14 ETH_SendTCP
Ethernet Functions
Syntax
byte ETH_SendTCP(byte sock_id, byte buf[], word len);