未接收到<策略文件请求>从闪存打开安全套接字时的字符串
我有一个应用程序正在尝试在网络服务器上打开安全套接字连接。我托管了一个小代码,该代码在端口 843 上提供策略文件,这是 Flash Player 建立套接字连接所需的。但我没有收到指定的字符串
,取而代之的是我收到在安全套接字连接期间发送到端口 443 的第一个字符串。
此闪存套接字策略服务器比实际开发过程花费更多时间。 请透露一些信息。
I have an app that is trying to open a secure socket connection on a web server. I hosted a small code that servers the policy file on port 843 as is required by flash player in order to make the socket connection. But i am not receiving the specified string <policy-file-request/>
, in place of it i am getting the first string that is sent to port 443 during secure socket connection.
This flash socket policy server is taking more time than actual development process.
Please shed some light.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在对
Socket
对象调用connect
之前,我进行以下调用:Security.loadPolicyFile("xmlsocket://" + ip + ":" + port)正如
我在评论中提到的,如果我在 FlashPlayer 中运行 SWF,它似乎不会回复任何内容,甚至不会发送 。但无论如何我都可以通过套接字连接。然而,如果我在网络服务器上运行它,情况就不是这样了。然后它将正确触发来自处理PolicyRequests的SocketServer的响应。
Before calling
connect
on aSocket
-object, I make this call:Security.loadPolicyFile("xmlsocket://" + ip + ":" + port);
As I mentioned in my comment it doesn't seem to reply anything, or even send the , if I run the SWF in a FlashPlayer. But I am able to connect via socket anyway. This is not the case if I run it on a webserver however. Then it will correctly trigger a response from the SocketServer that handles PolicyRequests.
看起来为了提供一个策略文件来保护套接字,您必须在服务器端打开安全套接字,普通的 tcp 套接字不会有帮助。虽然我仍然不知道为什么我们必须通过 SSL 提供策略文件,但这只是检查是否允许连接的一种方法。无论如何,如果您遇到困难,请继续在服务器端实现安全套接字。
it looks like in order to serve a policy file to secure socket you have to open secure socket on server side, a normal tcp socket wont help. Although i still have no idea why do we have to serve the policy file over SSL, it's just a way to check if the connection is allowed. anyway if you are stuck go ahead and implement a secure socket on server side.