Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

How can I use SecurityMode.enabled? (aSmack 4.0.0)

$
0
0

ConnectionConfiguration config = new ConnectionConfiguration(   

                                                            "192.168.8.158", 5222);

XMPPConnection connection = new XMPPTCPConnection(config);

                                        try {

                                                  connection.connect(); // Throw SmackException$NoReponseException here.

                                        } catch (SmackException e) {

                                                  // TODO Auto-generated catch block

                                                  e.printStackTrace();

                                        } catch (IOException e) {

                                                  // TODO Auto-generated catch block

                                                  e.printStackTrace();

                                        } catch (XMPPException e) {

                                                  // TODO Auto-generated catch block

                                                  e.printStackTrace();

                                        }

 

The openfire just use the default settings, and I can use Spark to connect the server.

 

But if I add the code like this:

config.setSecurityMode(SecurityMode.disabled);

the app connected to the server.But why can't I useSecurityMode.enabled?

 


Viewing all articles
Browse latest Browse all 10742

Trending Articles