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");
        }
 public EchoHandler( IMessagingControl messagingControl, ISendCallback sendCallback )
 {
     theMessagingControl = messagingControl;
     theSendCallback = sendCallback;
 }
コード例 #4
0
 public EchoHandler(IMessagingControl messagingControl, ISendCallback sendCallback)
 {
     theMessagingControl = messagingControl;
     theSendCallback     = sendCallback;
 }
 /// <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;
 }