code-sharp / wampsharp-docs Goto Github PK
View Code? Open in Web Editor NEWDocumentation for the WampSharp project
Documentation for the WampSharp project
Unable to integrate WampSharp into my IoT UWP apps that make use of .NET 5.0. Error as follows when installing package:
Install-Package : Version conflict detected for System.Collections.Immutable.
CrossBarTest (≥ 1.0.0) -> Microsoft.NETCore.UniversalWindowsPlatform (≥ 5.0.0) -> Microsoft.NETCore (≥ 5.0.0) ->
System.Collections.Immutable (≥ 1.1.37)
CrossBarTest (≥ 1.0.0) -> WampSharp.Default (≥ 1.2.3.12-beta) -> WampSharp.Default.Client (= 1.2.3.12-beta) ->
WampSharp.NewtonsoftJson (= 1.2.3.12-beta) -> WampSharp (= 1.2.3.12-beta) -> System.Collections.Immutable (= 1.1.36).
At line:1 char:1
+ Install-Package WampSharp.Default -Pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Install-Package : Version conflict detected for System.Collections.Immutable.
CrossBarTest (≥ 1.0.0) -> Microsoft.NETCore.UniversalWindowsPlatform (≥ 5.0.0) -> Microsoft.NETCore (≥ 5.0.0) ->
System.Collections.Immutable (≥ 1.1.37)
CrossBarTest (≥ 1.0.0) -> WampSharp.Default (≥ 1.2.3.12-beta) -> WampSharp.Default.Client (= 1.2.3.12-beta) ->
WampSharp.Windows (= 1.2.3.12-beta) -> WampSharp (= 1.2.3.12-beta) -> System.Collections.Immutable (= 1.1.36).
At line:1 char:1
+ Install-Package WampSharp.Default -Pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Using the code below
Linux OpenSuSe Tumbleweed / mono 4.4.2 /nuget Latest/WampSharp 1.2.5-beta/target net45
DefaultWampChannelFactory doesn't seem to exist in WampSharp as imported on Linux
IWampChannel channel =
factory.CreateJsonChannel(serverAddress, "realm1");
Seems that CreateJsonChannel doesn't exist either
Any Help would be appreciated
using System;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Threading.Tasks;
using WampSharp.V2;
using WampSharp.V2.Client;
namespace Wamp
{
internal class Program
{
public static void Main(string[] args)
{
DefaultWampChannelFactory factory =
new DefaultWampChannelFactory();
const string serverAddress = "wss://api.poloniex.com";
IWampChannel channel =
factory.CreateJsonChannel(serverAddress, "realm1");
channel.Open().Wait(5000);
IWampRealmProxy realmProxy = channel.RealmProxy;
int received = 0;
IDisposable subscription = null;
subscription =
realmProxy.Services.GetSubject<int>("BTC_XMR")
.Subscribe(x =>
{
Console.WriteLine("Got Event: " + x);
received++;
if (received > 5)
{
Console.WriteLine("Closing ..");
subscription.Dispose();
}
});
Console.ReadLine();
}
}
}
Hi @darkl , I'm trying to construct my callees as a service. Transient and Singleton services are working as expected, but when I inject scoped services, since there is no HTTP context available, they are created in the default scope and because of that they behave as singleton (we are using a DI pretty similar to .Net Core Di ). I found out that there is also a raw callee which exposes the invocation lifetime where I can create and dispose scopes before and after. Then I should build the wrapper again with another attribute. Is there any better way to achieve scoped invocation of callees?
Hi,
I am trying to understand how WampSharp uses threads / how it can be used in multii-threaded applications, but fail to find any documentation on that issues. To be specific, the following questions remain open so far:
GetCalleeProxy
?WampProcedure
s are defined as returning a Task<resultType>
instead of <resultType>
?Thanks in advance!
Michael
Hi. Apologies if this is the wrong place to post, but I couldn't find anything in documentation on where to ask WampSharp specific questions. I did post on stackoverflow, but there are only 10 WampSharp-related tags on there, so I figured I'll try on here as well. Here's my question:
'How to send a message to a specific client using WampSharp?'
Can we have step by step demo on TLS WampSharp router setup and client connection to wss://localhost/ws serving by WampSharp, please?
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.