284
Platforms
©2000-2008 Tibbo Technology Inc.
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:900.
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:900.
192.168.100.40:1100 sends UDP
datagram to the port 3000 of our
device
Reconnection accepted (so datagram
is accepted), but the socket will still
be sending all further outgoing
datagrams to 192.168.100.40:900
(because port switchover is off).
Example: PL_SOCK_RECONMODE_1
Setup:
sock.protocol= PL_SOCK_PROTOCOL_UDP
'we are dealing with UDP
sock.inconmode= PL_SOCK_INCONMODE_ANY_IPPORT
sock.reconmode= PL_SOCK_RECONMODE_
1
'reconnects accepted from any IP/port,
port switchover off
sock.localportlist=
"3000"
sock.targetport=
"900"
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:900.
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:900.
Example: PL_SOCK_RECONMODE_2
Setup:
sock.protocol= PL_SOCK_PROTOCOL_UDP
'we are dealing with UDP
sock.inconmode= PL_SOCK_INCONMODE_ANY_IPPORT
sock.reconmode= PL_SOCK_RECONMODE_
2
'reconnects accepted from the same IP,
any port, port switchover on
sock.localportlist=
"3000"
sock.targetport=
"900"
Two hosts are sending us datagrams and here is how the socket will react: