Skip to content

Instantly share code, notes, and snippets.

@codeplanner
Created October 2, 2013 09:31
Show Gist options
  • Save codeplanner/6791250 to your computer and use it in GitHub Desktop.
Save codeplanner/6791250 to your computer and use it in GitHub Desktop.
Full source code of XSockets.NET Generic controller
/// <summary>
/// The built-in "default" controller of XSockets.
/// This controller will dispatch any messages you throw at it to all subscribers
///
/// Example in JavaScript see: http://xsockets.net/video-tutorials Part 4 - Publish/Subscribe
/// </summary>
public class Generic : XSocketController
{
/// <summary>
/// Cathes any message without an action method and sends the message to all subscribers
/// </summary>
/// <param name="textArgs"></param>
public override void OnMessage(ITextArgs textArgs)
{
this.SendToAll(textArgs);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment