Solvline Eddy DKV2.1.0.3 User Manual
Page 91
Chapter 6. Library
Introduction
91
-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.
SB_SendUdpClient
Function
Transmit data to UDP socket (Client mode)
Format
Int SB_SendUdpClient (int Handle, char *Buffer, int Data_Size,
Char *IP_Address, int Socket_No);
Parameter
Handle
Buffer
Handle number bound to UDP socket.
Buffer point where packet data to be sent is saved.