Giter VIP home page Giter VIP logo

wampsharp-docs's People

Contributors

darkl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wampsharp-docs's Issues

Windows Universal App IoT Core Support

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

can't get your subscriber example to work

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();
        }
    }
}

Injecting scoped services as callee

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?

Threading questions

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:

  • Is it safe to use a channel from multiple threads as a caller (using e.g. GetCalleeProxy?
  • When I register a callee, is the method it defined always run in a separate thread? If, for example, it takes 5 seconds to compute, and two callers call it simultaneously – will it take 5 seconds or 10?
  • How does this behavior depend on whether the callee's WampProcedures are defined as returning a Task<resultType> instead of <resultType>?

Thanks in advance!
Michael

Where can I ask questions about WampSharp?

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?'

http://stackoverflow.com/questions/35700030/how-to-send-a-message-to-a-specific-client-using-wampsharp

@darkl

TLS WampSharp router example

Can we have step by step demo on TLS WampSharp router setup and client connection to wss://localhost/ws serving by WampSharp, please?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.