285
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
Incoming datagram
Socket reaction
192.168.100.40:1000 sends UDP
datagram to the port 3000 of our
device
Datagram accepted, UDP "connection"
is now in progress, the socket will be
sending all further outgoing
datagrams to 192.168.100.40:1000.
192.168.100.44:1001 sends UDP
datagram to the port 3000 of our
device
Datagram ignored- it came from a
different IP. The socket will still be
sending its outgoing datagrams to
192.168.100.40:1000.
192.168.100.40:1100 sends UDP
datagram to the port 3000 of our
device
Reconnection accepted, the socket will
be sending all further outgoing
datagrams to 192.168.100.40:1100.
Example: PL_SOCK_RECONMODE_3
Setup:
sock.protocol= PL_SOCK_PROTOCOL_UDP
'we are dealing with UDP
sock.inconmode= PL_SOCK_INCONMODE_ANY_IPPORT
sock.reconmode= PL_SOCK_RECONMODE_
3
'reconnects accepted from any IP/port,
port switchover on
sock.localportlist=
"3000"
sock.targetport=
"900"
Now, two hosts are sending us datagrams and here is how the socket will react:
Incoming datagram
Socket reaction
192.168.100.40:1000 sends UDP
datagram to the port 3000 of our
device
Datagram accepted, UDP "connection"
is now in progress, the socket will be
sending all further outgoing
datagrams to 192.168.100.40:1000.
192.168.100.44:1001 sends UDP
datagram to the port 3000 of our
device
Reconnection accepted, the socket will
be sending all further outgoing
datagrams to 192.168.100.44:1001.