Skip to content

Instantly share code, notes, and snippets.

@chamons
Created September 16, 2016 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chamons/42dcf78a788e0ebacab1a1d741f29c7d to your computer and use it in GitHub Desktop.
Save chamons/42dcf78a788e0ebacab1a1d741f29c7d to your computer and use it in GitHub Desktop.
using System;
using PusherClient;
namespace TestPushConsole
{
class MainClass
{
public static void Main (string[] args)
{
var _pusher = new Pusher ("asnyString", new PusherOptions
{
Encrypted = true
//Authorizer = new PusherAuthorizer(_token, channelInfo.AuthEndpoint, this)
});
_pusher.Error += OnPusherError;
Channel channel = _pusher.Subscribe ("channelname");
_pusher.ConnectionStateChanged += OnPusherConnectionStateChanged;
_pusher.Connect ();
}
static void OnPusherConnectionStateChanged (object sender, ConnectionState state)
{
Console.WriteLine (state.ToString ());
}
static void OnPusherError (object sender, PusherException error)
{
Console.WriteLine (error.Message);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment