December 2000
Intermediate to advanced
784 pages
20h 54m
English
We look at the client program first (Figure 19.2). It has four tasks. It accepts commands from the user and transmits them in the proper format to the chat server, and it accepts messages from the server and transforms them into human-readable output for the user.
The client uses two dispatch tables to handle user commands and server events. %COMMANDS dispatches on commands typed by the user. Each key is the text of a command (e.g., " join "), and each value is an anonymous subroutine that is invoked when the command is issued. In most cases, the subroutine simply sends the appropriate event code ...
Read now
Unlock full access