Created
September 16, 2016 15:35
-
-
Save chamons/42dcf78a788e0ebacab1a1d741f29c7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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