
/*
 *
 * DISCLAIMER OF WARRANTIES.
 * The following [enclosed] code is sample code created by IBM
 * Corporation. This sample code is not part of any standard or IBM
 * product and is provided to you solely for the purpose of assisting
 * you in the development of your applications.  The code is provided
 * "AS IS". IBM MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
 * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE, REGARDING THE FUNCTION OR PERFORMANCE OF
 * THIS CODE.  IBM shall not be liable for any damages arising out of
 * your use of the sample code, even if they have been advised of the
 * possibility of such damages.
 *
 * DISTRIBUTION.
 * This sample code can be freely distributed, copied, altered, and
 * incorporated into other software, provided that it bears the above
 * Copyright notice and DISCLAIMER intact.
 */

This directory contains a sample program that illustrates the use of
Event Manager.  The executable built is called "main.exe".

Before building the executable make sure the environment SOMBASE is set
to the root directory of SOM. Make sure the environment variable SOMIR
is set appropriately.  This sample requires the CORBA C bindings.  Run
somcorba.bat to generate the CORBA bindings.

To build the sample:

 - Microsoft users enter "nmake -f makefile.msc".

To clean up the directory after running the samples:

 - Microsoft users enter "nmake clean".

Before running the program, make sure that the following environment
variables are set.

- SOMSOCKETS should be set to the name of the Socket implementation
  class (For Win32 Workstation DSOM this is typically "localhost").
- HOSTNAME should be set to machine on which this program is running.

Run the program "main".

The following are the menu driven commands supported by the sample:

 Register
   Work Procedure  - Registers a Work procedure to be called back when there are
                     no events.
   Socket          - Creates a socket, binds it to a port, registers the socket
                     with EMan and then wait for input messages (msg socket).
   Timer           - Registers a timer that pops every 1000 milliseconds
   Update Timer    - Changes the above timer registration to pop every 800
                     milliseconds instead

 Unregister
   Work Procedure  - Unregisters the above work procedure interest
   Timer           - Unregisters the above timer
   Socket          - Unregisters the above socket.

 Event
   Client 1        - Creates a client event with a method callback
   Client 2        - Creates a client event with a procedure callback
   Send            - Starts a second instance of the program to send a message
                     to the above socket.
                     When the message is received fully, a window message is
                     posted to shut down the second instance.
 Quit              - Exit program



