/**全局变量*/
private var _connection:XMPPTLSConnection;
protected function button1_clickHandler(event:MouseEvent):void
{
_connection=new XMPPTLSConnection();
_connection.username="";
_connection.password="";
_connection.server="";
_connection.port=5222;
_connection.resource="";
_connection.config=new TLSConfig(TLSEngine.CLIENT);
_connection.config.trustSelfSignedCertificates=true;
_connection.config.ignoreCommonNameMismatch=true;
_connection.tls=true;
_connection.addEventListener(LoginEvent.LOGIN, onLoginSuccess);
_connection.connect();
}
protected function onLoginSuccess(event:LoginEvent):void
{
var presence:Presence = new Presence;
// presence.show=Presence.SHOW_CHAT;
_connection.send(presence);
}
以上是xiff的类库通过TLS方式登录的过程,xiff3.0.0的版本没有很好的实现TLS,所以你要去官网的svn上面下载最新的代码,然后通过以上代码才能完成TLS登录过程
相关资料请查看:http://community.igniterealtime.org/thread/41568
分享到:
相关推荐
xiff 3帮助文档xiff 3帮助文档xiff 3帮助文档xiff 3帮助文档xiff 3帮助文档
openfire服务器配置,XIFF登录,单聊,群聊,带图,非常详细,并附问题及解决办法 采用XMPP协议(http://baike.baidu.com/view/189676.htm) 服务器端采用OpenFire(http://baike.baidu.com/view/1483859.htm) ...
xiff聊天工具,基于xmpp协议开发,,非常容易部署和架设你的局域网聊天工具
xiff最新3.0.0版本,和openfire集成实现即时通讯功能
XIFF3.4.2.swc XIFF3.4.2.swc XIFF3.4.2.swc XIFF3.4.2.swc
sparkWeb中使用的XMPP implementations For Flash
xiff xampp socket 消息
xiff the new source folder
xiff最新3.4.2版本,和openfire集成实现即时通讯功能
压缩包包含xiff3.0 ,消息接收端FLA代码,网页,IE打开recip.html,务必将存放文件夹添加到信任,详细见使用方法.doc 肯定能用
xiff_3_4_2.swc 博文链接:https://wangcheng.iteye.com/blog/157468
本事例是接收端事例,如需发送端代码请忽下载浪费积分 资源包含xiff3.0库,消息接收端FLA源码,HTML文件,打开recip.html使用消息接收端
XIFF3是由AS3编写的一个库包专门用于IM软件开发。可以用AIR开发或者是FLEX开发。目前最新版本为3.4.2
介绍了如何在xmpp协议中将自定义信息从as3中传递到服务器
导入flash builder即可
Flex 即时聊天客户端 用了XIFF类库, 基于XAPP协议,Openfire作服务器。
一个ActionScript 2库,用于在Macromedia Flash中开发XMPP(Jabber)客户端。
Flex实现的xmpp消息发送接收,利用xiff插件实现,可以在android、ios等手机运行,也可以直接在ie上运行