Reference Manual

NAME

chatd - open or close the chat dialog box
SYNOPSIS
chatd [min]
DESCRIPTION
Command chatd opens the chat dialog box or closes it if currently open. The optional argument min indicates that the dialog box should be minimised.

The multi-line edit control in the chat dialog box displays the incoming chat message. An audible alarm is sounded on message arrival. The user then has 60 seconds to respond to the message, the progress bar indicating the time remaining.

If no response is sent within that time, the chat connection is closed and the remote partner is notified.

If the Autoreply checkbox is set, the text shown in the single-line edit control is sent automatically in response to each incoming chat message. The text defaults to an Out of Office message, but can be customized by creating a file called autoreply.txt in your NAT32 directory.

NOTES

The chat dialog can be used to add real-time interactive communications capability to web pages hosted on an Internet web server. A web page on that server should link to the Java Applet chat.class, that displays a small chat window allowing the user to enter a chat message and read the reply.

The Applet sends the chat message to the NAT32 computer currently running the NAT32 Web Server and then displays the subsequent reply. This is done by sending an HTTP GET request that causes the PHP Script chat.php to be executed. The script computes the current IP address and port number of the machine running the NAT32 Chat Dialog. This is done by parsing the file ip.htm, that is automatically updated each time the IP address of the NAT32 machine changes as described here.

The technique can easily be modified to run on your own Apache web server, as long as your Web Hosting Service supports FTP upload of an HTML file containing the current link to your Web Server. The technique does not depend on third-party Dynamic DNS services in order to locate your Web Server and NAT32 machine.

To download the sample code, click here.

SEE ALSO
chat
[Edit] [Back]