-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Crossbar router would give me an error "invalid magic byte (octet 1) in opening handshake: was 0x{magic}, but expected 0x7f" when attempting to use RawSocketClientTransportProvider
WAMP protocol requires a handshake with 0x7f followed by an octet that specifies max message size and serialization format.
I got it to work by modifying startTransportProvider:
public function startTransportProvider(ClientInterface $client, LoopInterface $loop)
{
$this->client = $client;
$this->loop = $loop;
$connector = $this->connector ?: new Connector($loop);
$connector->connect($this->address . ':' . $this->port)->then(function (ConnectionInterface $connection) {
$connection->write(pack('C4', 0x7f, 0xf1, 0x0, 0x0));
$this->handleConnection($connection);
$connection->on('data', [$this, 'handleData']);
$connection->on('close', [$this, 'handleClose']);
}, 'printf');
}
Not sure I know enough at this time to do a PR
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels