How to use the tls.connect function in tls

To help you get started, we’ve selected a few tls examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webvariants / susi / susi-nodejs / susi.js View on Github external
var initSocket = function(){
        _socket = tls.connect(4000,"localhost", options, startSuccess);
        _socket.on('error',function(){
            console.log('error connecting susi...');
            setTimeout(initSocket,500);
        }); 
        _socket.on('close',function(){
            console.log('error connecting susi...');
            setTimeout(initSocket,500);
        });        
    };
    initSocket();
github oftn-oswg / lic / petal / irc / Connection.js View on Github external
this.ssl_load (function (options) {
			connection = tls.connect (this.port, this.host, options);
			setup (connection);
		});
	} else {
github infinispan / js-client / lib / io.js View on Github external
function connectSslSocket(fulfill, reject, conn) {
      var sslOpts = transport.sslOpts();
      var options = sslSocketOpts(sslOpts, reject);
      var localSock = tls.connect(addr.port, addr.host, options, function() {
        logger.debugf('Connecting via SSL to %s, socket is %s, server name is: `%s`', show(),
                      localSock.authorized ? 'authorized' : 'unauthorized',
                      localSock.servername);
        fulfill(conn);
      });
      return localSock;
    }
github DataDog / datadog-serverless-functions / azure / blobs_logs_monitoring / index.js View on Github external
function getSocket(context) {
    var socket = tls.connect({ port: DD_PORT, host: DD_URL });
    socket.on('error', err => {
        context.log.error(err.toString());
        socket.end();
    });

    return socket;
}
github DataDog / datadog-serverless-functions / azure / activity_logs_monitoring / index.js View on Github external
function getSocket(context) {
    var socket = tls.connect({ port: DD_PORT, host: DD_URL });
    socket.on('error', err => {
        context.log.error(err.toString());
        socket.end();
    });

    return socket;
}

tls

[![Build Status](https://secure.travis-ci.org/rolandpoulter/js-utils.png)](http://travis-ci.org/rolandpoulter/js-utils)

Unknown
Latest version published 12 years ago

Package Health Score

41 / 100
Full package analysis