
275
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
Individual sockets have all the traditional settings you would expect to find, such
as destination port number, protocol, etc. At the same time, their functionality
goes significantly beyond what you usually find, and includes a lot of additional
features that significantly lower the amount of code you need to write. For
example, you can restrict incoming connections to your device, automatically filter
out certain messages within the TCP data stream, etc.
The sockets object also implements webserver (HTTP) functionality. Each socket
can carry a "normal" data connection or be in the HTTP mode.
Currently, the socket object can only access first 65534 bytes of each
HTML file, even if the actual file is larger! Make sure that all HTML files
in your project are not larger than 65534 bytes. This is not to be
confused with the size of HTTP output generated by the file. A very
large output can be generated by a small HTML file (due to dynamic
data)- and that is OK. What's important is that the size of each HTML
file in your project does not exceed 65534 bytes.
The sock object should not be confused with objects used to represent actual
network interfaces, such as the
object which represents the Ethernet
interface. The socket object is responsible for actual IP (TCP or UDP)
communications -- it doesn't matter which interface these communications are
effected through. Therefore, this is not the right place to look for a property such
as 'IP address'. This is an attribute of a particular network interface.
Follows is the list of features offered by each socket of the sock object:
Support for UDP, TCP and HTTP protocols (this is a submode of TCP).
An extensive set of properties that define which hosts can connect to the socket,
whether broadcasts are supported, which listening ports are associated with the
socket, etc.
Support for automatic processing of inband commands-- messages that are
passed within the TCP data stream.
Detailed socket state reporting with 30 different states supported!
Fully asynchronous operation with separate "data arrival" and "data sent"
events.
Automatic data overrun detection on the RX buffer.
Adjustable receive (RX), transmit (TX), and other buffer sizes for optimal RAM
utilization.
Buffer shorting feature for fast data exchange between the sock object and other
objects (such as the
object) that support standard Tibbo Basic data
buffers.
8.3.5.1
Overview
This section covers the socket object in detail. Here you will find:
267
224
276
276