Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Sockets using SSL/TLS

Hi,

I'm trying to initiate a secure socket connection using the following:

var ISOS_HEART_VAR_DEFAULT_API_HOST = 'tls://customer.heartinternet.co.uk';
var ISOS_HEART_VAR_DEFAULT_API_PORT = 674;

var socket = Titanium.Network.createTCPSocket({
hostName:ISOS_HEART_VAR_DEFAULT_API_HOST,
port:ISOS_HEART_VAR_DEFAULT_API_PORT,
mode:Titanium.Network.READ_MODE
});

When I run the app and click the button that runs 'socket.connect()' nothing happens, except that about 30 seconds later the app crashes (this is using the simulator and not on a live phone). After the socket.connect() runs other trivial buttons on the window are still responsive but no longer execute the code behind them, even if that code is as simple as a message box.

There are no debug messages produced and indeed socket.connect() is wrapped in a try…catch. The app appears to exit 'gracefully' but obviously doesn't.

If anyone has any ideas about why this might be happening I'd be really grateful to hear from you, and also let me know if there's any information I can provide to make it easier to diagnose.

Cheers

— asked July 19th 2010 by C L
  • iphone
  • mobile
  • sockets
  • ssl
  • tls
0 Comments

1 Answer

  • Please, read my answer :)

    — answered February 10th 2011 by jordi domenech
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.