Eddy DK Programmer Guide
109
SB_BindUdp
Function
Binds UDP socket.
Format
Int SB_BindUdp (int Socket_No);
Parameter
Socket_No
UDP socket number to bind
Returns
Handle
Handle number bound to UDP socket
-1: Bind failure
N: Handle number bound to UDP socket
Notice
SB_ReadUdp
Function
Reads data transmitted to UDP socket bound in network.
Format
Int SB_ReadUdp (int Handle, char *Buffer, int Buffer_Size);
Parameter
Handle
Buffer
Buffer_Size
Handle number bound to UDP socket
Buffer point where packet data to be read will be
saved
Size of the buffer to save
Returns
-1 ~ N
Size of the data read.
-1: Socket error
0: No data was read
N: Length of the data read
Notice
When client sends data to bound UDP socket, this function remembers
client’s IP address and socket number for SB_SendUdpServer to use.
SB_SendUdpServer
Function
Transmits data to UDP socket. (Server mode)
Format
Int SB_SendUdpServer (int Handle, char *Buffer, int Data_Size);
Parameter
Handle
Buffer
Data_Size
Handle number bound to UDP socket
Buffer point where packet data to be sent is saved
Size of the buffer to send
Returns
None
Notice
This function can be called after confirming client’s network
information by sending data to UDP socket bound to Eddy from
network; that is, user has to call SB_ReadUdp first.
When data transmission has to be made first, user has to use
SB_SendUdpClient function.
Содержание Eddy DK
Страница 1: ...1 Eddy DK Programmer Guide Ver 2 5 1 1 2011 02 15...
Страница 10: ...Eddy DK Programmer Guide 10 2 3 Eddy CPU v2 1 v2 5...
Страница 36: ...Eddy DK Programmer Guide 36 2 4 4 External Device Interface Description...
Страница 47: ...Eddy DK Programmer Guide 47 Eddy S4M v2 1 Eddy S4M v2 5...