2016-04-21 6 views
0

私のローカルWebサイトからワンプ接続を試みています。私はラチェット/ Wampをサーバー側で使用し、autobahn | jsをクライアント側で使用しました。サービスは正常に動作しており、接続できます。サーバー上でonOpen/onCloseコールバックがトリガーされています。ラチェット/ワンプとオートバンの標準的な最新バージョンとのプロトコル違反により、ワンプ接続が失敗しました

しかし、私がブラウザから接続すると、接続のonopenコールバックが呼び出されることはありません。代わりに、コンソールログには、次のことを示しています

"AutobahnJS debug enabled" autobahn.js:123:6 
"Ok, Autobahn loaded" "0.9.9" wamp.php:28:1 
"trying to create WAMP transport of type: websocket" autobahn.js:732:6 
"using WAMP transport type: websocket" autobahn.js:732:6 
Array [ 1, "blablaRealm", Object ] autobahn.js:732:6 
"WebSocket transport send" "[1,"blablaRealm",{"roles":{"caller":{"features":{"caller_identification":true,"progressive_call_results":true}},"callee":{"features":{"caller_identification":true,"pattern_based_registration":true,"shared_registration":true,"progressive_call_results":true,"registration_revocation":true}},"publisher":{"features":{"publisher_identification":true,"subscriber_blackwhite_listing":true,"publisher_exclusion":true}},"subscriber":{"features":{"publisher_identification":true,"pattern_based_subscription":true,"subscription_revocation":true}}}}]" autobahn.js:732:6 
"WebSocket transport receive" "[0,"19232286535719350273b26118584308",1,"Ratchet\/0.3.4"]" autobahn.js:732:6 
"failing transport due to protocol violation: unexpected message type 0" autobahn.js:732:6 
InvalidAccessError: A parameter or an operation is not supported by the underlying object autobahn.js:5308:0 

InvalidAccessErrorはおそらく正しく初期化やったことがなかったのWebSocketオブジェクトのcloseメソッドの呼び出し中に、私は私が原因を知った後、これが消える願っていますされます私が今暗闇の中で完全に解決している方法についての主な問題。

あなたは何が起こっているのか考えていますか?私が使用しているラチェットとアウトバーンとの間に互換性がないのでしょうか?どちらもスタンダードに準拠していると主張していますが、それは私が今考えていることです.Wampのことは初めてです。

答えて

1

ラチェットはWAMP v1です(これらのバージョンは唯一のバージョンだったので、ここでは書かれていますので、これについては言及しません)。 https://github.com/ratchetphp/Ratchet/issues/168

WAMP v2は、WAMP v2にはさらに多くの機能が用意されているため、私たちの側から削除されました(Crossbar.io/Autobahnプロジェクト)。 WAMP v1をサポートするAutobahnの古いバージョンがあります(上記のリンクされた問題のスレッドを参照してください)が、別のWAMPルーターに移行することをお勧めします。

私の提案は、もちろん私がプロジェクトに参加して以来のことですが、他にもあります - http://wamp-proto.org/implementationsを参照してください。

関連する問題