User`s guide
176
K
A
DAK
KwikNet Low Level Services
Description ...continued
Udprcv is the name of your application callback function which will be
called to process received UDP datagrams. Your function will receive
parameter
msgp, a pointer to a UDP message descriptor. The second
parameter, userp, is a copy of the pointer variable userp received as a
parameter in this kn_udpopen() procedure call.
Your UDP callback function must be coded as described in Chapter
4.1. The callback function must return -1 if it cannot accept the
message descriptor. It must return 0 if it accepts the UDP message
descriptor. In this case, your application must accept responsibility for
the UDP message descriptor and must eventually free the descriptor by
calling procedure kn_udpfree() when finished processing the
datagram.
Userp is any pointer variable which your udprcv() function might
require. NULL is an acceptable value.
Returns If successful, a non-zero UDP handle is returned.
On failure, a UDP handle of 0L is returned.
See Also kn_udpbind(), kn_udpclose(), kn_udpfree()
...more