Closed andzejsw closed 3 years ago
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.
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.
And I want to do it on iOS.
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.
Big tnx. I made my own socket transport using code from WebSocketTransport class. And then added just my headers for WebSocket.connect.
Is it possible to send custom HttpHeaders? For my project there is need to specify them.