Solvline Eddy DK User Manual
Page 111
Eddy DK Programmer Guide
111
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.