
VIIIContents
©2000-2008 Tibbo Technology Inc.
............................................................................................................................................................... 267Net Object
............................................................................................................................................................ 268Overview
.......................................................................................................................................................... 268Main Parameters
.......................................................................................................................................................... 269Checking Ethernet Status
............................................................................................................................................................ 269Properties, Methods, Events
.......................................................................................................................................................... 269.Mac R/O Property
.......................................................................................................................................................... 270.Ip Property
.......................................................................................................................................................... 270.Netmask Property
.......................................................................................................................................................... 270.Gatewayip Property
.......................................................................................................................................................... 271.Failure R/O Property
.......................................................................................................................................................... 271.Linkstate R/O Property
.......................................................................................................................................................... 271On_net_link_change Event
.......................................................................................................................................................... 272On_net_overrun Event
............................................................................................................................................................... 272Button Object
............................................................................................................................................................ 273On_button_pressed Event
............................................................................................................................................................ 273On_button_released Event
............................................................................................................................................................ 274.Pressed R/O Property
............................................................................................................................................................ 274.Time R/O Property
............................................................................................................................................................... 274Sock Object
............................................................................................................................................................ 275Overview
.......................................................................................................................................................... 276Anatomy of a Socket
.......................................................................................................................................................... 276Socket Selection
.......................................................................................................................................................... 277Handling Network Connections
....................................................................................................................................................... 278TCP connection basics
....................................................................................................................................................... 278UDP "connection" basics
....................................................................................................................................................... 279Accepting Incoming Connections
....................................................................................................................................................... 281Accepting UDP broadcasts
....................................................................................................................................................... 281Understanding TCP Reconnects
....................................................................................................................................................... 283Understanding UDP Reconnects and Port Switchover
....................................................................................................................................................... 286Incoming Connections on Multiple Sockets
....................................................................................................................................................... 287Establishing Outgoing Connections
....................................................................................................................................................... 288Sending UDP broadcasts
....................................................................................................................................................... 290Closing Connections
....................................................................................................................................................... 292Checking Connection Status
....................................................................................................................................................... 294More On the Socket's Asynchronous Nature
.......................................................................................................................................................... 297Sending and Receiving data
....................................................................................................................................................... 297Allocating Memory for Buffers
....................................................................................................................................................... 298Using Buffers in TCP Mode
....................................................................................................................................................... 299Using Buffers in UDP Mode
....................................................................................................................................................... 300TX and RX Buffer Memory Status
....................................................................................................................................................... 301Receiving Data in TCP Mode
....................................................................................................................................................... 303Receiving Data in UDP Mode
....................................................................................................................................................... 304Sending TCP and UDP Data
....................................................................................................................................................... 306"Split Packet" Mode of TCP Data Processing
....................................................................................................................................................... 307Handling Buffer Overruns
....................................................................................................................................................... 308Redirecting Buffers
....................................................................................................................................................... 309Sinking Data
.......................................................................................................................................................... 309Working With Inband Commands
....................................................................................................................................................... 309Inband Message Format
....................................................................................................................................................... 310Inband-related Buffers (CMD, RPL, and TX2)
....................................................................................................................................................... 311Processing Inband Commands
....................................................................................................................................................... 313Sending Inband Replies
.......................................................................................................................................................... 314Using HTTP
....................................................................................................................................................... 315HTTP-related Buffers
....................................................................................................................................................... 317Setting the Socket for HTTP
....................................................................................................................................................... 318Socket Behavior in the HTTP Mode
....................................................................................................................................................... 319Including BASIC Code in HTTP Files
....................................................................................................................................................... 320Generating Dynamic HTML Pages
....................................................................................................................................................... 322URL Substitution