# $Id$ Introduction: This example illustrates the usage of the XtReactor from TAO. The server creates a small display dialog and the client displays a dialog with a start and stop button. On pressing the start button the server dialog box starts a stopwatch. On the pressing the stop the stopwatch stops. On repressing the start the stopwatch resets and start all over again. To run the server and the client simply do the following: $ server -o foo.ior $ client -k file://foo.ior Note: this test only does something useful if the Xtoolkit is enabled and the executables linked against the following libraries Xm, Xt & X11. --------------------------------------------------------------------- Technical Description: In addition to specifying the resources that the ORB needs to allocate for an Xt event loop, the ORB also needs the information about the XtAppContext in which the user application is initialised. To provide these information TAO provides a class by name "TAO_XT_Resource_Factory" that inherits from the TAO_Default_Resource_factory. This provides the user with a static method through which he can set the XtAppContext. To make TAO understand that the user is in fact wants to use the TAO_XT_Resource_Factory and not the default resource factory, the application developer must add the following line to his svc.conf file. dynamic Resource_Factory Service_Object * TAO:_make_TAO_XT_Resource_Factory() "" Please see the line of code in server.cpp that sets the XtAppContext in the TAO_XT_Resource_factory. One more interseting observation would be to note that the server and client run on the Xt event loop by calling the XtAppMainLoop ().