問題タブ [xmlsocket]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - Android の ActionScript ソケット
ActionScript で記述された Flash クライアント アプリケーションがあります。このアプリケーションは、XMLSocket クラスを使用してポート 5750 で TCP/IP 経由でサーバー デバイスと通信します。したがって、たとえば、ブラウザで Flash クライアントを実行し、サーバーに接続することができます。インターネット上にあります。
Android の最近のバージョンでは Flash がサポートされているため、Android デバイスに Flash クライアントをインストールすると、これが機能することが期待できます。ただし、接続の試行はハングするだけです。現在、クライアント側には診断はありません。実行中の Flash アプリケーションだけです。したがって、ログや標準エラー メッセージはありません。
サーバー デバイスは基本的にブラック ボックスですが、サーバーがクライアントからの要求を取得しないことは明らかです。これは、クライアントがソケットを開くことができなかったことを示しています。
基本的な Web 検索では、この状況についてあまり知られていないことがわかります。ここで何がうまくいかないのかについて何か考えはありますか?
たとえば、XMLSocket は Android では動かないのでしょうか? または、Android がポート 5750 をブロックしますか? または、Flash Player には何らかのサンドボックスまたはファイアウォールの制限が組み込まれていますか?
Android 2.2 ~ 2.3 および Android Flash Player 10 ~ 11 を実行するいくつかの異なる Android デバイスを試しました。クライアントは ActionScript 2 で記述されています。
flash - フラッシュxmlsocket接続ホストには専用IPが必要ですか?
xmlsocketフラッシュベースのゲーム用にホストを準備したいのですが、この場合は経験がありません。専用のIPが必要ですか、それとも共有IPアドレスでxmlソケットを実行できますか?
java - ソケットを使用してAndroidアプリ(Flex付き)をJavaサーバーに接続しますか?
複数のユーザーがローカルネットワーク上でホストされているサーバーにログインするアプリを作成しようとしています。Flash Builderでアプリをテストすると接続されますが、携帯電話で実行すると接続されません。
私は次のようにXMLSocketを使用しています:
ポリシーファイルについてはよくわかりません。何かができることを期待して、そこにファイルを入れました。
flash - XMLSocket「ポリシーファイルのロードに失敗しました」エラー
XMLSocket.swfファイルを使用しようとしていますが、接続されていません。サーバーでポートを開く必要がありますか?これを専用のリモートWindows2008サーバーで実行しようとしています。
FlashFirebugからのエラーは次のとおりです。
crossdomain.xmlはWebディレクトリのルートに保存され、次のようになります。
apache-flex - AS3 XMLSocket がクライアント側の切断を検出できない
Flex アプリケーション (AIR ではなく Flash プレーヤー) 内で XMLSocket を実行していますが、私の人生では、クライアント側の切断を検出する方法がわかりません。のように、コンピューターからリモートサーバーに接続し、コンピューターをインターネットから切断すると、ソケットはまだ接続されていると認識します (IOError またはクローズイベントがスローされません)。私のソケットクラス内では、接続が切断されると XMLSocket.send() で IOError が検出されることを期待して、2 秒ごとにメッセージをソケットに送信するようにしていますが、これでも機能しません! それでもデータを送信しようとし、例外をスローしませんが、確かに失敗しています。
インターネット接続が確立されている場合、リモート サーバーのソケット サーバーは Flex クライアントからのメッセージを取得します。
SocketMonitor と URLMonitor を調べましたが、これらは AIR でのみ使用でき、Flash Player では使用できません。
私が理解していないソケットについて何か基本的なことがあると思います。誰でも助けることができますか?
java - Javaソケットサーバー
私はすでにそれを失っています...
FlashDevelop(AS3)を介して単純なFlashアプリケーションを構築し、それをサーバーと通信させたい。次に、次のコードを使用して単純なSocketJavaアプリケーションを作成しました。
Main.java:
およびxSocketDataHandler.java:
したがって、問題は次のとおりです。
Javaアプリケーションを起動すると、完全に実行されます。Flashアプリケーションを起動すると、実行され、ソケットオブジェクトが作成され、サーバーに接続されます(すべてコンピューター内にあります)。サーバーは接続を試行しますが、次の場合に実行されます。
nbcが閉じていることを示し、サーバーは例外をキャッチします。
"onData: channel is closed (read buffer size=0)"
なぜ私がいつもこれを手に入れるのか誰かが知っていますか?どのように記述しても、Socket、XMLSocket、xSocketDataHandlerなどを使用しても、クローズドチャネルエラーが発生し続けます。
私は何が間違っているのですか?
ありがとう。
編集1:
AS3コード:
これは私のSocketクラスです:
actionscript-3 - Flash が XMLSocket をセットアップできません
フラッシュでプロジェクトを開始しましたが、XMLSocket を起動できません。
私のコード:
パッケージ Network クラス CommunicationBootstrap:
私のエラーは何ですか: ioErrorHandler: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2031: Socket Error. URL: 127.0.0.1"] securityErrorHandler: [SecurityErrorEvent type="securityError" bubbles =false cancelable=false eventPhase=2 text="エラー #2048: セキュリティ サンドボックス違反: file:///C|/Users/iufrs/Documents/AS3/1/Torn.swf は 127.0.0.1:30000 からデータを読み込めません。 "]
(トレースと 2 つのイベントで取得)
actionscript-3 - AS3、xmlSocket、エンコーディング
私は作業しxmlSocket
ていますが、エンコーディングの問題があります (と思います)。Flash Builder でevent.data
プロパティをトレースするとデータが期待どおりに表示されますが、デバッグすると認識されない文字が多数表示されます。
画像を参照してください:
使用するAlert.show()
と、これらの認識されない文字が表示され、部分文字列メソッドと文字列メソッドを使用するときにも問題が発生します。
当然、トレースのバージョンで作業したい...
エンコードの問題…?それを解決する方法? byteArray を使用しようとしましたが、成功しませんでした。
注意: ソケット サーバー コードを変更したり、表示したりすることはできません。
ありがとう
python - Flash クライアント XMLsocket が Python サーバーに接続できない
次のように、XMLsocketを使用してpythonサーバーに接続するフラッシュクライアントがあります。
このpythonスクリプトを使用してセキュリティファイルを送信します
これを使用して、クライアントからメッセージを受信します。
これらのスクリプトを実行すると、security.py が次のように出力されます。
しかし、server.py はこれ以外には何も出力しません:
そしてフラッシュのデバッグは何も出力しません
フラッシュはセキュリティ ファイルを正常に受信したようですが、XMLsocket.connect は失敗しましたか?