public ControlClientUsingFiltersAndProperties( ISendToFilterCallback callback ) { theSendToFilterCallback = callback; theSession = Diffusion.Sessions.Principal( "control" ).Password( "password" ) .Open( "ws://diffusion.example.com:80" ); theMessagingControl = theSession.GetMessagingControlFeature(); // Register and receive all messages sent by clients on the "foo" branch and include the "JobTitle" session // property value with each message. To do this, the client session must have the "register_handler" // permission. theMessagingControl.AddMessageHandler( "foo", new BroadcastHandler( theMessagingControl, theSendToFilterCallback ), "JobTitle" ); }
public ControlClientUsingFiltersAndProperties(ISendToFilterCallback callback) { theSendToFilterCallback = callback; theSession = Diffusion.Sessions.Principal("control").Password("password") .Open("ws://diffusion.example.com:80"); theMessagingControl = theSession.GetMessagingControlFeature(); // Register and receive all messages sent by clients on the "foo" branch and include the "JobTitle" session // property value with each message. To do this, the client session must have the "register_handler" // permission. theMessagingControl.AddMessageHandler( "foo", new BroadcastHandler(theMessagingControl, theSendToFilterCallback), "JobTitle"); }
/// <summary> /// Constructor. /// </summary> /// <param name="messagingControl">The messaging control object.</param> /// <param name="callback">The filter callback.</param> public BroadcastHandler( IMessagingControl messagingControl, ISendToFilterCallback callback ) { theMessagingControl = messagingControl; theSendToFilterCallback = callback; }
/// <summary> /// Constructor. /// </summary> /// <param name="messagingControl">The messaging control object.</param> /// <param name="callback">The filter callback.</param> public BroadcastHandler(IMessagingControl messagingControl, ISendToFilterCallback callback) { theMessagingControl = messagingControl; theSendToFilterCallback = callback; }