digitalcreations / pusher.net Goto Github PK
View Code? Open in Web Editor NEW.NET client library for Pusher.com
License: MIT License
.NET client library for Pusher.com
License: MIT License
I want to set up more than one event contract with the same data structure. The event names that broadcast contain the same data structure in some instances.
PusherClient.AddContract(EventContract.Create<FileData>("file:update"));
PusherClient.AddContract(EventContract.Create<FileData>("file:delete"));
I have subscribed to the channel.GetEventSubscription<FileData>().EventEmitted
event but whenever I cause my client to pick up either of these events, all I get back is:
pusher_internal:subscription_succeeded
{"presence":null}
If I remove one of the Event Contracts, things work as expected.
How do I add more than one Event Contract?
Thanks
I am writing a WPF .NET application and have been using Pusher for the websocket implementation. I would call this issue an edge case but it's happening often enough that I really want to fix it. Whenever the PC goes to sleep and then returns out of sleep, the app crashes and it looks to be due to Pusher trying to reconnect the socket even though it thinks it is already connected. Here is the stack trace from the Event Viewer:
--FROM CLIENT-- INFO: System.Exception: The socket is connected, you neednt' connect again!
at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
at Pusher.Pusher.<<.ctor>b__2>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_1(Object state)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() AT 6/29/2017 9:12:36 PM
The socket is connected, you neednt' connect again!
I found in the SuperSocket source code which Pusher.NET uses. Any guidance here would be immensely helpful. I have everything wrapped in exception handling but the app still crashes and I'm not sure why. It also doesn't help that I cannot personally reproduce this issue.
Hello Folks,
Great job you've done here, today I started implementing a Pusher.NET for Xamarin (iOS). I'm basing my Connection implementation on Socket Rocket (https://github.com/square/SocketRocket/) and it's proxy to .NET (https://github.com/thefactory/SocketRocket-Sharp/blob/master/TestChat/TestChatViewController.cs)
However, I'm having troble with the authenticator as for the authentication mechanism I need the channel I'm subscribing to, and including it on the C'tor doesn't seem like a feasible option.
Is there any particular reason why you didn't include the channel object on the Authenticate call?
thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.