udpStartListen (Function) |
Top Previous Next |
This starts to listen for data received as a connectionless UDP packet on the specified local port. The data will then be received with the updReceive function block.
Note: many GSM networks are using a firewall so that inbound connections to the RTCU are blocked when using the mobile network interface.
Input: port : DINT Port number listening on.
rip : DINT Remote IP address accepted. 0 = all IP addresses accepted (default).
iface : SINT (default 0) The network interface to listen on. 0 = all networks (default), 1 = Mobile network, 2 = LAN network, etc. (See Network)
Returns: SINT ID for the connection or 0 if an error occurred (out of resources).
Declaration: FUNCTION udpStartListen : SINT; iface : SINT :=0; // Interface to listen on
Example: INCLUDE rtcu.inc |