Giter VIP home page Giter VIP logo

Comments (5)

andzejsw avatar andzejsw commented on August 26, 2024 1

Big tnx. I made my own socket transport using code from WebSocketTransport class. And then added just my headers for WebSocket.connect.

from connectanum-dart.

konsultaner avatar konsultaner commented on August 26, 2024

You could definitly do it by extending one of the transport classes

// Start a client that connects without the usage of an authentication process
  final client1 = Client(
      // The realm to connect to
      realm: 'demo.connectanum.receive',
      // We choose WebSocket transport
      transport: MyCustomWebSocketTransport( ///<---------------- write your own
        'wss://www.connectanum.com/wamp',
        // if you want to use msgpack instead of JSON just import the serializer
        // from package:connectanum/msgpack.dart and use WebSocketSerialization.SERIALIZATION_MSGPACK
        Serializer(),
        WebSocketSerialization.SERIALIZATION_JSON,
      ));

What platform are you aiming? Maybe I can help.

from connectanum-dart.

andzejsw avatar andzejsw commented on August 26, 2024

You could definitly do it by extending one of the transport classes

// Start a client that connects without the usage of an authentication process
  final client1 = Client(
      // The realm to connect to
      realm: 'demo.connectanum.receive',
      // We choose WebSocket transport
      transport: MyCustomWebSocketTransport( ///<---------------- write your own
        'wss://www.connectanum.com/wamp',
        // if you want to use msgpack instead of JSON just import the serializer
        // from package:connectanum/msgpack.dart and use WebSocketSerialization.SERIALIZATION_MSGPACK
        Serializer(),
        WebSocketSerialization.SERIALIZATION_JSON,
      ));

What platform are you aiming? Maybe I can help.

Ok tnx. I will take a look.

from connectanum-dart.

andzejsw avatar andzejsw commented on August 26, 2024

And I want to do it on iOS.

from connectanum-dart.

andzejsw avatar andzejsw commented on August 26, 2024

It looks like, that I will need help this one. I have no idea how to add logic for my custom socket transport class, so that plugin sends specific header.

from connectanum-dart.

Related Issues (20)

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.