
SDK Programming Guide Version 1.511
ABLELink
R
Ethernet-Serial Server MAXI Series
pbuf
the pointer of data buffer to be sent out
Return Value:
SUCCESS successful
others error, the definition of ERROR number please refer to the file
“
tcpdef.h
”
Example:
send data to the specific node (IP address: 10.0.52.100; port number:
0x1234).
ulong remoteIP
= 0x6434000a; // IP addr = 10.0.52.100
ushort remotePORT
= 0x1234;
main()
{
udp_open( &handle )
udp_send ( handle, remotePORT, remoteIP, buf, len);
:
//
processing
:
}
Remarks:
This function is used to send data to the destination node. The maximum
data length is 1460 bytes.
udp_reset()
Description:
Release all of the UDP ports.
Include:
tcpapi.h, tcpdef.h
Usage:
int udp_reset ()
Input Parameters:
Return Value:
SUCCESS successful
others error, the definition of ERROR number please refer to the file
“
tcpdef.h
”
Example:
Close all of the UDP channels
udp_open ( handle1 );
udp_open ( handle2 );
:
udp_reset ( );
wait ( 5 );
// wait for 5 seconds for garbage collection
Remarks:
This function is used to close all of the UDP communication channels
Copyright © 2004 Atop Technologies, Inc.
All rights reserved. Designed in Taiwan.