SuperSocket系列文档(15) 在SuperSocket中启用内置Flash/Silverlight策略服务器
时间:2011-05-15 来源:江大鱼
SuperSocket内置了支持Flash和Silverlight的客户端的Socket策略服务器,其实现代码在
SuperSocket.Facility.dll这个assembly之中。所以要启用策略服务器,首先要保证SuperSocket.Facility.dll存在于SuperSocket运行目录,然后在配置文件中增加相关的节点即可。
Flash策略服务器
<socketServer>
<servers>
<server name="FlashPolicyServer"
serviceName="FlashPolicyService"
ip="Any" port="843"
mode="Async"
receiveBufferSize="32"
maxConnectionNumber="100"
policyFile="Policy\flash.xml"
clearIdleSession="true">
</server>
</servers>
<services>
<service name="FlashPolicyService" type="SuperSocket.Facility.PolicyServer.FlashPolicyServer, SuperSocket.Facility" />
</services>
</socketServer>
Silverlight策略服务器
<socketServer>
<servers>
<server name="SilverlightPolicyServer"
serviceName="SilverlightPolicyService"
ip="Any" port="943"
mode="Async"
receiveBufferSize="32"
maxConnectionNumber="100"
policyFile="Policy\silverlight.xml"
clearIdleSession="true">
</server>
</servers>
<services>
<service name="SilverlightPolicyService" type="SuperSocket.Facility.PolicyServer.SilverlightPolicyServer, SuperSocket.Facility" />
</services>
</socketServer>
请注意server配置节点中,policyFile属性是你的策略文件的存放路径。
相关阅读 更多 +