Skip to content

Setting Msgpack doesn't propagate to websocket upgrade request HTTP package #1015

@dionytadema

Description

@dionytadema

Hi, for a work project i'm trying to send binary data over wamp, this requires the msgpack serialization. However i can't get it to work.

i create my component with the code below:

connection = Component(
    transports=[{
        "url": u'ws://192.168.0.178:9000',
        "serializers": ['msgpack'],
        "max_retries": -1,
        "max_retry_delay": 20  # seconds
    }],
    realm=u'main',
)

when connecting to my router (https://github.com/gammazero/nexus) i get the following error:
dropping connection to peer tcp4:192.168.0.178:9000 with abort=True: I dropped the WebSocket TCP connection: The server does not speak any of the WebSocket subprotocols we requested.

the router however does support msgpack, and using it with Autobahn|Js works fine with this js code:

var connection = new autobahn.Connection({
		realm: "main",
		transports: [{
			type: 'websocket',
			url: "ws://192.168.0.178:9000",
			protocols: ['wamp.2.msgpack']
		}],
	})
connection.open()

i attached a 'not' working example (txt as .py is not supported for uploads)

test.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions