	TCP/IP clients and servers for TCL -- Installation Instructions



Files on this tape:

README		- This file
Makefile	- Makefile for the TCL-TCP/IP interface
main.patch	- Patch to the Tk 1.3 `main' program to add the `tcp' command.
simple.c	- Test program for the TCP/IP interface
tclTCP.c	- Source code to the TCP/IP interface
tclTCP.h	- Header file describing the TCP/IP interface
tcp.man		- Man page for the TCP/IP interface
tkEvent.patch	- Patch required for the Tk 1.3 or Tk1.4 `tkEvent.c' module --
			see instructions
demos		- Subdirectory containing a set of demonstration programs.

Instructions:

- Unpack this package.

- If you are running Tcl 6.2 or earlier (Tk 1.4 or earlier), there is a bug
  in tkEvent.c that will keep this package from executing.  A context diff
  is in the file, `tkEvent.patch', and should be installed in your copy of Tk.
  (It is OK to create a copy of tkEvent.o in this directory and use it).
  Tk 2.0 is NOT recommended with this package, since there are additional
  problems with tkEvent.c.  Tk 2.1 is the recommended event manager to use.

- In Tcl 6.3 and earlier releases, there is a bug in tclAssem.c that will
  sometimes cause unusual symptoms when remote commands return null results.
  A patch is included in tclAssem.patch, and should be installed in your copy
  of Tcl.

- Edit the Makefile as necessary for your system.  If you need to use a
  -I option for cc to find <tcl.h> and <tk.h>, add it to the CFLAGS= line.
  If you need a -L option for the loader to find libtcl.a and libtk.a, add it
  to the LDFLAGS= line.

- Get a copy of `main.c' from the Tk source distribution, and apply the patch
  in `main.patch' to it.   (This makes a copy of `wish' with the TCP server
  code linked in.)  The patch works with Tk 1.4, 2.0, or 2.1, with different
  offsets.

- Type `make' to make the whole package.

- For a simple test of the server interface, type `./simple&'.  This command
  will start a Tcl interpreter running as a server in the background.  You
  can connect to the server by typing `telnet localhost 2323'.  You can type
  Tcl commands to the background server, and type the command, `bye' when you
  are done playing with it.

- A broader set of demos is contained in the `demos' subdirectory.  To try
  them, cd to the `demos' subdirectory and type the command,
	./master.tcl &
  This will start a server in the background that contains a simple Tcl program
  that maintains a color.

  You can then type the commands
	./swatch.tcl &
	./bars.tcl &
	./entries.tcl &
	./colortab.tcl &

  to start up a number of clients that work with the color server.  Try
  changing the color using `bars', `entries', or `colortab', and notice that
  all the other views change in synchrony.  (By the way, note also that you
  can have multiple copies of the various clients in execution at once.)

  When you're done, hit the `Quit' button on each client, deiconify the server,
  and hit its `Quit' button as well.

- You're now ready to add the TCP/IP support to your own Tcl applications.
  Look at simple.c and main.patch for the Tcl_AddCommand call that installs
  the TCP support in the interpreter.  It's that simple.

Please direct correspondence on this package to Kevin Kenny,
KennyKB@CRD.GE.COM.

CHANGES IN RELEASE 1.0

Several changes have been made here and there to enhance portability.
The package is now known to work on
	- Decstation 3000 and 5000 series running Ultrix.
	- VAX running ULTRIX.
	- Sun 3 and Sun 4 (Sparcstation and equivalents) under SunOS.
	- Hewlett-Packard 9000 Series 300.

Event management has been split into a file called simpleEvent.c,
separate from the TCP-specific code.  Support for Xt's main event loop
has been added to the event management.

The man pages have been greatly expanded and updated.

The demos have been updated to run correctly with tk 2.0 and 2.1.

A few debugging print statements have been removed.

Bug fixes:
	- A server process no longer aborts if a server is closed
	  before all its clients have been closed.  THis also avoids
	  an intermittent behavior where a process would abort rather
	  than terminating in response to `destroy .'.
	- Closing a connection from the server end with `$connection
	  close' no longer causes SIGPIPE.  This was a problem only on
	  some varieties of UN*X.
	- The default `trusted host' check is more forgiving of
	  unusual system configurations.
	- A bug has been fixed in simpleFileSelect that caused hangs
	  in the event loop under certain circumstances.

THINGS TO DO FOR THE NEXT RELEASE:
	
	- Allow for specifying ports by service name instead of
	  number.

	- (Maybe) Allow Unix-domain sockets as well as AF_INET.

	- Allow for servers started by inetd.


