Mailslots 2 Servers
===================

Demonstrates a main "client" program getting services from two
separate "server" programs it starts via VB6's Shell() function.
The Client interacts with these Servers using local Mailslots.
These are manipulated using the SimpleMailslot control.

SimpleMailslot implements one *Mailslot server* for inbound
messages and 0 to many *Mailslot clients* for sending outbound
messages.


DIAGRAM
=======

Each of the three programs runs a Mailslot server to get input.
The Client maintains two Mailslot clients, one for sending to
each of the two Server programs.  Each Server uses a single
Mailslot client for sending messages back to the Server program.

                   ====================
                   |  Client Program  |
                   |                  |
                   --------------------
                   |  SimpleMailslot  |
                   --------------------
                   |MSCli|MSSvr |MSCli|
                   ====================
                      |   ^   ^    |
                      |  /     \   |
           -----------|--       ---|---------
          /           v            v         \
      ====================     ====================
      | MSCli  | MSSvr   |     | MSSvr  | MSCli   |
      --------------------     --------------------
      |  SimpleMailslot  |     |  SimpleMailslot  |
      --------------------     --------------------
      |                  |     |                  |
      |  Server Program  |     |  Server Program  |
      ====================     ====================


MESSAGES
========

Messages are formatted as a set of fields separated by "|"
characters.  Messages from the Server programs are previxed with
a "source ID" value so the Client knows which messages it is
dealing with.


MESSAGE FLOW: TICKSERVER
========================

TickServer is pretty simple.  It just sends a "tick" count every
so often (500 ms.).

Tickserver:  TickServer|RUNNING

    This tells the Client that TickServer is up.  The Client can
    then open its Mailslot client to TickServer.

TickServer:  TickServer|<tick count>

    These are sent to the Client program's Mailslot server each
    "tick" of its timer.

Client:      QUIT

    This tells the TickServer to terminate.


MESSAGE FLOW: DIRSERVER
=======================

DirServer is slightly more complex.  It produces and returns a
directory listing upon request.

DirServer:   DirServer|RUNNING

    This tells the Client that DirServer is up.  The Client can
    then open its Mailslot client to DirServer and enable its
    UI elements realted to making directory requests.

Client:      <depth>|<directory path>

    This is a request to create and return a directory listing
    of depth <depth> for the path <directory path>.

DirServer:   DirServer|FIRST|<first or only part of listing>

    This is the initial or only part of the requested directory
    listing.  It is sent in parts to accomodate the message
    size limit of a local Mailslot.  The Client can clear its
    directory display textbox and put this initial part of the
    response into it.

DirServer:   DirServer|MORE.|<subsequent part of listing>

    DirServer returns 0 or more of these additional text
    messages.  The Client appends these to the end of the text
    accumulated in its directory display textbox.

Client:      QUIT

    This tells the DirServer to terminate.


COMMENTS
========

Depending on the <depth> and <directory path> values a directory
request can return a VERY LARGE response.  This was included here
to demonstrate how to handle long messages by breaking them up,
as well as the behavior you may see when processing very long
messages.
