// $Revision: 1.5 $ // Copyright (C) 1994-1995 Taligent, Inc. All rights reserved. #ifndef TaligentSamples_SENDER #include "Sender.h" #endif #ifndef TaligentSamples_SENDERDISPATCHER #include "SenderDispatcher.h" #endif #ifndef Taligent_SERVICEACCESS #include #endif #ifndef Taligent_MESSAGESTREAMS #include #endif #ifndef Taligent_DISPATCHERTHREAD #include #endif // You must maintain the reference count of the service definition manually. Sigh. void main() { TLocalObjectName serviceName("RemoteNotificationSampleServer"); TQualityOfService serviceQuality(TQualityOfService::kSameHost); TStandardServiceDefinition* serviceDefinition = new TStandardServiceDefinition(serviceName, serviceQuality); serviceDefinition->AddReference(); try { TRequestReceiverStream receiverStream(serviceDefinition); TSenderDispatcher dispatcher(new TSender); TDispatcherThread::Dispatch(receiverStream, dispatcher); } catch (...) { qprintf("RemoteNotificationSample: caught exception while creating receiverStream and dispatcher.\n"); } serviceDefinition->RemoveReference(); }