281
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
HTTP is only possible on TCP!
Setting allowed interfaces
The sock object is interface-independent and supports communications over more
than one interface. The
property defines the list of
interfaces on which the current socket will accept incoming connections. The list is
different and depends on the platform. Each platform section of the manual
contains a topic named "Platform-dependent Programming Information". You will
find the list of available interfaces inside this section, under the "Available network
interfaces" heading.
property stored the string that lists all interfaces
that the socket will listen on:
sock.allowedinterfaces =
"NET,WLN"
'listen on Ethernet and Wi-Fi
interfaces
Connections accepted even when the VM is paused
Once the socket has been setup it will accept an incoming connection even when
the VM is paused (for example, has stopped on your breakpoint). All
communications are handled by the
, so the socket does not
need the VM to accept an incoming connection (or, for that matter, receive and
send the data).
Accepting UDP broadcasts
UDP datagrams can be sent as broadcasts. Broadcast, instead of specifying a
particular network host as a destination, targets a group of hosts on the network.
The sock object supports link-level broadcasts. Such broadcast packets
have their destination MAC address set to 255.255.255.255.255.255.
Link-level broadcasts are received by all network hosts connected to
the current network segment. Link-level broadcasts cannot penetrate
routers, bridges, etc.
For the socket to accept incoming UDP broadcasts, the
property must be set to 1- YES. In every other aspect working with incoming
broadcast UDP datagrams is like working with regular incoming datagrams.
Understanding TCP Reconnects
The sock object has a unique feature- support for "reconnects". To simplify the
explanation, let us start from a description of a real-life problem first.
When reconnects save the day
327
327
7
327