`
linyu19872008
  • 浏览: 278440 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

关于xiff设置TLS安全连接

 
阅读更多
/**全局变量*/
			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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics