A new applet from Chuck Shotton called NetEvents provides scripting interfaces that make it easy to create client and server Internet apps that run on Macs.
Back in February Chuck Shotton and I got together to build a solid TCP foundation for Mac script writers and app developers.
The goal was 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 application called NetEvents 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 learn what it can do. That's the basic idea.
We shared this work with several members of the Mac scripting 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.
As of Sunday, 2/16/97, we're expanding the group to include members of the WebSTAR-talk, Mac Scripting, Frontier-talk, and Frontier-webmaster lists.
Download and install
Please download the NetEvents software from:
http://www.biap.com/downloads/netevents.html
Support for NetEvents is included in Frontier 4.2.3. Sample scripts are in the netEvents.samples table.
The NetEvents app
NetEvents is a 0K 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.
NetEvents is a low-level interface. Higher-level interfaces are being implemented. 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.
Pointers
Over time, Chuck will release new versions of the NetEvents app. You will be able to find the newest version, and interfaces for C programers, at his NetEvents page on www.biap.com.
The contents of the system.verbs.apps.netEvents table is listed on the NetEvents Interface page on this site.
It took just a couple of hours to put together a server framework, called inetd, which is short for Internet Daemon Manager.
Check out the ODB Server suite for a more complete server-side framework than inetd.
Preston has done some other great things recently with NetEvents: Webster a TCP dictionary interface; Frontier implementation of the Unix Cron scheduler.
Watch the Scripting News page for links to more new stuff as it becomes available.
See the Frontier Mailing Lists page for instructions on subscribing. Please only discuss this software on the lists for now. Thanks!
Dave Winer
© Copyright 1996-97 UserLand Software. This page was last built on 10/21/97; 10:15:34 AM.
It was originally posted on 2/1/97; 5:12:59 AM.
Internet service provided by Conxion.