frondoc picture
What is Frontier?
Download
News & Updates
Mailing Lists
Sample Scripts
DocServer
The Finder
Search
Guestbook
Site Outline
BBS
User's Guide
1 2 3 4 5 6
7 8 9 10 11
Apple File Edit
Main Open Suites
Web Window
Menubar Outline
Script Table WP

Frontier website on www.scripting.com

Net Events

A new TCP applet with scripting interfaces that makes it easy to program client and server Internet apps that run on Macs.

A few weeks ago Chuck Shotton and I got together to build a solid TCP foundation for Mac script writers and app developers.

The goal is to provide a connection between TCP, the standard transport method for the Internet, and Apple Events, the standard way of connecting Macintosh applications and system software.

Simply put, we connect the Apple Event Manager to TCP, providing reliable stream-oriented TCP connections for apps and scripts running on Macintoshes.

We support script writers working in either AppleScript or Frontier, or mixed environments. The Apple Event interface is designed to be easily accessed from C or other machine languages. The Frontier scripting interface will be cross-platform.

The package includes a small 30K application that provides the stream management code. The code was cribbed from the source code of Chuck's Pounder app. It's been well tested, is leak-free, is threaded. There have been some new features added that may have leaks or may not perform reliably.

We both decided that we've waited long enough for the big companies to move. They may not really understand what we want. We have a nice playground here -- let's explore some, and show off what it can do. That's the basic idea.

We shared this work with several members of the Frontier community over the last couple of weeks, and the software seems to work, and we know how we want to proceed. So it's time to share it with a wider group of people.

Download and install

Please download the NetEvents package:

ftp://ftp.scripting.com/userland/netEvents.sit.hqx

Double-click on each of the Frontier files in the folder, click on OK to all confirmation prompts.

Chuck has provided development notes in SimpleText format; they are also included in the folder.

The NetEvents app

NetEvents is a new 37K app that implements a TCP stream interface thru Apple Events. It must be running for any of this to work. It implements calls that allow you open a stream, read from or write to a stream, get the status of a stream, or close one. You can create server apps in Frontier by calling netEvents.listenStream.

NetEvents has an 'aete' resource, so it can be scripted from AppleScript without running inside Frontier. Sample scripts in AppleScript will be distributed, if people from the AppleScript community provide them. Thanks!

In Frontier, check out netEvents.examples for some scripts that do interesting stuff.

NetEvents is a low-level interface. Higher-level interfaces are possible. We're working on one to emulate the Unix "inetd" interface for writing server daemons.

We're working with Alan German, the lead script writer on the TCPCMD project to be sure that those interfaces can act as a bridge to the NetEvents app. As much as possible, we want to protect the investment people have made in TCPCMD.

Stay tuned

Watch the Scripting News page for links to new stuff as it becomes available.

Dave Winer
Sat, Feb 15, 1997 at 11:14:27 AM by DW


© Copyright 1996-97 UserLand Software. This page was last built on Sat, Feb 15, 1997 at 11:30:18 AM with Frontier. Thanks for checking it out! Dave