Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Trusted Contributor
sakfg
Posts: 224
Registered: ‎08-09-2011
My Device: 9550

How to give the server Name for non ssl

Hi all,

 

     Currently Working on XMPP lib. here  

 for ssl :final SecureConnection sc = (SecureConnection)Connector.open("ssl://" + this.server + ":" + this.port, Connector.READ_WRITE);

 

 

ssl Socket connection Used .I want to Use the non ssl And for this can any one explain  for that  Socket connction.

  

 

Please use plain text.
Developer
simon_hain
Posts: 16,190
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How to give the server Name for non ssl

socket:// maybe?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Trusted Contributor
sakfg
Posts: 224
Registered: ‎08-09-2011
My Device: 9550

Re: How to give the server Name for non ssl

Hi ,
Thank you for Reply, I am Using socket for Non-SSl
as

final StreamConnection connection = (StreamConnection) Connector.open("socket://" + this.host + ":" + this.port);
this.reader = new XmlReader(connection.openInputStream());
this.writer = new XmlWriter(connection.openOutputStream());

And i am getting exception at this.reader.next();

Can you explain why i am getting at while reading the data after opening suceesful Stream connection..

Please use plain text.
Developer
simon_hain
Posts: 16,190
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How to give the server Name for non ssl

open does nothing, only when you read/write or request the response code etc is the connection really opened.

what exception do you get? i would suggest to test the connection before you put additional parts (like xml parsing) on it.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Trusted Contributor
sakfg
Posts: 224
Registered: ‎08-09-2011
My Device: 9550

Re: How to give the server Name for non ssl

Is Xmpp chat works for BIS and Wifi,
Please use plain text.