FlashSocket.IO, policyfile и Socket.IO Ошибка: не удалось загрузить файл политики из xmlsocket://localhost:843

Следуя моему коду для создания сервера и сервера политик:

var app = require('http').createServer(handler)
  , io = require('socket.io').listen(app),  fspfs = require('policyfile')
  , fs = require('fs'), url = require('url');

  flash = fspfs.createServer();

  flash.listen(10081,app, function(){
        console.log(':3 yay');
    });
app.listen(3000);

на Flash я инициализирую сокеты как, socket = new FlashSocket("localhost:3000"); socket.addEventListener(FlashSocketEvent.CONNECT, onConnect); socket.addEventListener(FlashSocketEvent.MESSAGE, onMessage); socket.addEventListener(FlashSocketEvent.IO_ERROR, onError); socket.addEventListener(FlashSocketEvent.SECURITY_ERROR, onError);

Когда я запускаю приложение, я получаю следующую ошибку:

Ошибка: не удалось загрузить файл политики из xmlsocket://localhost:843

*** Security Sandbox Violation ***
Connection to localhost:3000 halted - not permitted from http://dev/FlashSockets_Demo-debug/FlashSockets_Demo.swf
Error: Request for resource at xmlsocket://localhost:3000 by requestor from http://dev/FlashSockets_Demo-debug/FlashSockets_Demo.swf is denied due to lack of policy file permissions.

0 ответов

Другие вопросы по тегам