/// <summary> /// Creates a new client connection to the given port and host (old API) or options.port and options.host. (If host is omitted, it defaults to localhost.) /// </summary> /// <param name="port"> Port the client should connect to</param> /// <param name="host">Host the client should connect to</param> ///<param name="option">options should be an object which specifies: /// <list type="bullet"> /// <item> host: Host the client should connect to.</item> /// <item> host: Host the client should connect to.</item> /// <item> port: Port the client should connect to.</item> /// <item> socket: Establish secure connection on a given socket rather than creating a new socket. If this option is specified, host and port are ignored.</item> /// <item> pfx: A string or Buffer containing the private key, certificate and CA certs of the server in PFX or PKCS12 format.</item> /// <item> key: A string or Buffer containing the private key of the client in PEM format.</item> /// <item> passphrase: A string of passphrase for the private key or pfx.</item> /// <item> cert: A string or Buffer containing the certificate key of the client in PEM format.</item> /// <item> ca: An array of strings or Buffers of trusted certificates. If this is omitted several well known "root" CAs will be used, like VeriSign. These are used to authorize connections.</item> /// <item> rejectUnauthorized: If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Default: false.</item> /// <item> NPNProtocols: An array of string or Buffer containing supported NPN protocols. Buffer should have following format: 0x05hello0x05world, where first byte is next protocol name's length. (Passing array should usually be much simpler: ['hello', 'world'].)</item> /// <item> servername: Servername for SNI (Server Name Indication) TLS extension. /// </list></param> /// <param name="callback">The callback parameter will be added as a listener for the 'secureConnect' event.</param> /// <returns>tls.connect() returns a CleartextStream object.</returns> public CleartextStream connect(JsNumber port, JsNumber host, ConnectOptions options, JsAction callback) { return(null); }
/// <summary> /// Creates a new client connection to the given port and host (old API) or options.port and options.host. (If host is omitted, it defaults to localhost.) /// </summary> /// <param name="option">options should be an object which specifies: /// <list type="bullet"> /// <item> host: Host the client should connect to.</item> /// <item> host: Host the client should connect to.</item> /// <item> port: Port the client should connect to.</item> /// <item> socket: Establish secure connection on a given socket rather than creating a new socket. If this option is specified, host and port are ignored.</item> /// <item> pfx: A string or Buffer containing the private key, certificate and CA certs of the server in PFX or PKCS12 format.</item> /// <item> key: A string or Buffer containing the private key of the client in PEM format.</item> /// <item> passphrase: A string of passphrase for the private key or pfx.</item> /// <item> cert: A string or Buffer containing the certificate key of the client in PEM format.</item> /// <item> ca: An array of strings or Buffers of trusted certificates. If this is omitted several well known "root" CAs will be used, like VeriSign. These are used to authorize connections.</item> /// <item> rejectUnauthorized: If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Default: false.</item> /// <item> NPNProtocols: An array of string or Buffer containing supported NPN protocols. Buffer should have following format: 0x05hello0x05world, where first byte is next protocol name's length. (Passing array should usually be much simpler: ['hello', 'world'].)</item> /// <item> servername: Servername for SNI (Server Name Indication) TLS extension. /// </list></param> /// <param name="callback">The callback parameter will be added as a listener for the 'secureConnect' event.</param> /// <returns>tls.connect() returns a CleartextStream object.</returns> /// <example> /// Here is an example of a client of echo server as described previously: /// <code> /// var tls = require('tls'); /// var fs = require('fs'); /// var options = { /// // These are necessary only if using the client certificate authentication /// key: fs.readFileSync('client-key.pem'), /// cert: fs.readFileSync('client-cert.pem'), /// /// // This is necessary only if the server uses the self-signed certificate /// ca: [ fs.readFileSync('server-cert.pem') ] /// }; /// /// var cleartextStream = tls.connect(8000, options, function() { /// console.log('client connected', /// cleartextStream.authorized ? 'authorized' : 'unauthorized'); /// process.stdin.pipe(cleartextStream); /// process.stdin.resume(); /// }); /// cleartextStream.setEncoding('utf8'); /// cleartextStream.on('data', function(data) { /// console.log(data); /// }); /// cleartextStream.on('end', function() { /// server.close(); /// }); ///</code></example> ///<example> /// Or ///<code> /// var tls = require('tls'); /// var fs = require('fs'); /// /// var options = { /// pfx: fs.readFileSync('client.pfx') /// }; /// /// var cleartextStream = tls.connect(8000, options, function() { /// console.log('client connected', /// cleartextStream.authorized ? 'authorized' : 'unauthorized'); /// process.stdin.pipe(cleartextStream); /// process.stdin.resume(); /// }); /// cleartextStream.setEncoding('utf8'); /// cleartextStream.on('data', function(data) { /// console.log(data); /// }); /// cleartextStream.on('end', function() { /// server.close(); /// }); /// </code> /// </example> public CleartextStream connect(ConnectOptions options, JsAction callback) { return(null); }
/// <summary> /// Creates a new client connection to the given port and host (old API) or options.port and options.host. (If host is omitted, it defaults to localhost.) /// </summary> /// <param name="option">options should be an object which specifies: /// <list type="bullet"> /// <item> host: Host the client should connect to.</item> /// <item> host: Host the client should connect to.</item> /// <item> port: Port the client should connect to.</item> /// <item> socket: Establish secure connection on a given socket rather than creating a new socket. If this option is specified, host and port are ignored.</item> /// <item> pfx: A string or Buffer containing the private key, certificate and CA certs of the server in PFX or PKCS12 format.</item> /// <item> key: A string or Buffer containing the private key of the client in PEM format.</item> /// <item> passphrase: A string of passphrase for the private key or pfx.</item> /// <item> cert: A string or Buffer containing the certificate key of the client in PEM format.</item> /// <item> ca: An array of strings or Buffers of trusted certificates. If this is omitted several well known "root" CAs will be used, like VeriSign. These are used to authorize connections.</item> /// <item> rejectUnauthorized: If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Default: false.</item> /// <item> NPNProtocols: An array of string or Buffer containing supported NPN protocols. Buffer should have following format: 0x05hello0x05world, where first byte is next protocol name's length. (Passing array should usually be much simpler: ['hello', 'world'].)</item> /// <item> servername: Servername for SNI (Server Name Indication) TLS extension. /// </list></param> /// <returns>tls.connect() returns a CleartextStream object.</returns> /// <example> /// Here is an example of a client of echo server as described previously: /// <code> /// var tls = require('tls'); /// var fs = require('fs'); /// var options = { /// // These are necessary only if using the client certificate authentication /// key: fs.readFileSync('client-key.pem'), /// cert: fs.readFileSync('client-cert.pem'), /// /// // This is necessary only if the server uses the self-signed certificate /// ca: [ fs.readFileSync('server-cert.pem') ] /// }; /// /// var cleartextStream = tls.connect(8000, options, function() { /// console.log('client connected', /// cleartextStream.authorized ? 'authorized' : 'unauthorized'); /// process.stdin.pipe(cleartextStream); /// process.stdin.resume(); /// }); /// cleartextStream.setEncoding('utf8'); /// cleartextStream.on('data', function(data) { /// console.log(data); /// }); /// cleartextStream.on('end', function() { /// server.close(); /// }); ///</code></example> ///<example> /// Or ///<code> /// var tls = require('tls'); /// var fs = require('fs'); /// /// var options = { /// pfx: fs.readFileSync('client.pfx') /// }; /// /// var cleartextStream = tls.connect(8000, options, function() { /// console.log('client connected', /// cleartextStream.authorized ? 'authorized' : 'unauthorized'); /// process.stdin.pipe(cleartextStream); /// process.stdin.resume(); /// }); /// cleartextStream.setEncoding('utf8'); /// cleartextStream.on('data', function(data) { /// console.log(data); /// }); /// cleartextStream.on('end', function() { /// server.close(); /// }); /// </code> /// </example> public CleartextStream connect(ConnectOptions option) { return(null); }
/// <summary> /// Creates a new client connection to the given port and host (old API) or options.port and options.host. (If host is omitted, it defaults to localhost.) /// </summary> /// <param name="option">options should be an object which specifies: /// <list type="bullet"> /// <item> host: Host the client should connect to.</item> /// <item> host: Host the client should connect to.</item> /// <item> port: Port the client should connect to.</item> /// <item> socket: Establish secure connection on a given socket rather than creating a new socket. If this option is specified, host and port are ignored.</item> /// <item> pfx: A string or Buffer containing the private key, certificate and CA certs of the server in PFX or PKCS12 format.</item> /// <item> key: A string or Buffer containing the private key of the client in PEM format.</item> /// <item> passphrase: A string of passphrase for the private key or pfx.</item> /// <item> cert: A string or Buffer containing the certificate key of the client in PEM format.</item> /// <item> ca: An array of strings or Buffers of trusted certificates. If this is omitted several well known "root" CAs will be used, like VeriSign. These are used to authorize connections.</item> /// <item> rejectUnauthorized: If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Default: false.</item> /// <item> NPNProtocols: An array of string or Buffer containing supported NPN protocols. Buffer should have following format: 0x05hello0x05world, where first byte is next protocol name's length. (Passing array should usually be much simpler: ['hello', 'world'].)</item> /// <item> servername: Servername for SNI (Server Name Indication) TLS extension. /// </list></param> /// <returns>tls.connect() returns a CleartextStream object.</returns> /// <example> /// Here is an example of a client of echo server as described previously: /// <code> /// var tls = require('tls'); /// var fs = require('fs'); /// var options = { /// // These are necessary only if using the client certificate authentication /// key: fs.readFileSync('client-key.pem'), /// cert: fs.readFileSync('client-cert.pem'), /// /// // This is necessary only if the server uses the self-signed certificate /// ca: [ fs.readFileSync('server-cert.pem') ] /// }; /// /// var cleartextStream = tls.connect(8000, options, function() { /// console.log('client connected', /// cleartextStream.authorized ? 'authorized' : 'unauthorized'); /// process.stdin.pipe(cleartextStream); /// process.stdin.resume(); /// }); /// cleartextStream.setEncoding('utf8'); /// cleartextStream.on('data', function(data) { /// console.log(data); /// }); /// cleartextStream.on('end', function() { /// server.close(); /// }); ///</code></example> ///<example> /// Or ///<code> /// var tls = require('tls'); /// var fs = require('fs'); /// /// var options = { /// pfx: fs.readFileSync('client.pfx') /// }; /// /// var cleartextStream = tls.connect(8000, options, function() { /// console.log('client connected', /// cleartextStream.authorized ? 'authorized' : 'unauthorized'); /// process.stdin.pipe(cleartextStream); /// process.stdin.resume(); /// }); /// cleartextStream.setEncoding('utf8'); /// cleartextStream.on('data', function(data) { /// console.log(data); /// }); /// cleartextStream.on('end', function() { /// server.close(); /// }); /// </code> /// </example> public CleartextStream connect(ConnectOptions option) { return null; }
/// <summary> /// Creates a new client connection to the given port and host (old API) or options.port and options.host. (If host is omitted, it defaults to localhost.) /// </summary> /// <param name="port"> Port the client should connect to</param> /// <param name="host">Host the client should connect to</param> ///<param name="option">options should be an object which specifies: /// <list type="bullet"> /// <item> host: Host the client should connect to.</item> /// <item> host: Host the client should connect to.</item> /// <item> port: Port the client should connect to.</item> /// <item> socket: Establish secure connection on a given socket rather than creating a new socket. If this option is specified, host and port are ignored.</item> /// <item> pfx: A string or Buffer containing the private key, certificate and CA certs of the server in PFX or PKCS12 format.</item> /// <item> key: A string or Buffer containing the private key of the client in PEM format.</item> /// <item> passphrase: A string of passphrase for the private key or pfx.</item> /// <item> cert: A string or Buffer containing the certificate key of the client in PEM format.</item> /// <item> ca: An array of strings or Buffers of trusted certificates. If this is omitted several well known "root" CAs will be used, like VeriSign. These are used to authorize connections.</item> /// <item> rejectUnauthorized: If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Default: false.</item> /// <item> NPNProtocols: An array of string or Buffer containing supported NPN protocols. Buffer should have following format: 0x05hello0x05world, where first byte is next protocol name's length. (Passing array should usually be much simpler: ['hello', 'world'].)</item> /// <item> servername: Servername for SNI (Server Name Indication) TLS extension. /// </list></param> /// <param name="callback">The callback parameter will be added as a listener for the 'secureConnect' event.</param> /// <returns>tls.connect() returns a CleartextStream object.</returns> public CleartextStream connect(JsNumber port, JsNumber host, ConnectOptions options, JsAction callback) { return null; }
/// <summary> /// Creates a new client connection to the given port and host (old API) or options.port and options.host. (If host is omitted, it defaults to localhost.) /// </summary> /// <param name="option">options should be an object which specifies: /// <list type="bullet"> /// <item> host: Host the client should connect to.</item> /// <item> host: Host the client should connect to.</item> /// <item> port: Port the client should connect to.</item> /// <item> socket: Establish secure connection on a given socket rather than creating a new socket. If this option is specified, host and port are ignored.</item> /// <item> pfx: A string or Buffer containing the private key, certificate and CA certs of the server in PFX or PKCS12 format.</item> /// <item> key: A string or Buffer containing the private key of the client in PEM format.</item> /// <item> passphrase: A string of passphrase for the private key or pfx.</item> /// <item> cert: A string or Buffer containing the certificate key of the client in PEM format.</item> /// <item> ca: An array of strings or Buffers of trusted certificates. If this is omitted several well known "root" CAs will be used, like VeriSign. These are used to authorize connections.</item> /// <item> rejectUnauthorized: If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Default: false.</item> /// <item> NPNProtocols: An array of string or Buffer containing supported NPN protocols. Buffer should have following format: 0x05hello0x05world, where first byte is next protocol name's length. (Passing array should usually be much simpler: ['hello', 'world'].)</item> /// <item> servername: Servername for SNI (Server Name Indication) TLS extension. /// </list></param> /// <param name="callback">The callback parameter will be added as a listener for the 'secureConnect' event.</param> /// <returns>tls.connect() returns a CleartextStream object.</returns> /// <example> /// Here is an example of a client of echo server as described previously: /// <code> /// var tls = require('tls'); /// var fs = require('fs'); /// var options = { /// // These are necessary only if using the client certificate authentication /// key: fs.readFileSync('client-key.pem'), /// cert: fs.readFileSync('client-cert.pem'), /// /// // This is necessary only if the server uses the self-signed certificate /// ca: [ fs.readFileSync('server-cert.pem') ] /// }; /// /// var cleartextStream = tls.connect(8000, options, function() { /// console.log('client connected', /// cleartextStream.authorized ? 'authorized' : 'unauthorized'); /// process.stdin.pipe(cleartextStream); /// process.stdin.resume(); /// }); /// cleartextStream.setEncoding('utf8'); /// cleartextStream.on('data', function(data) { /// console.log(data); /// }); /// cleartextStream.on('end', function() { /// server.close(); /// }); ///</code></example> ///<example> /// Or ///<code> /// var tls = require('tls'); /// var fs = require('fs'); /// /// var options = { /// pfx: fs.readFileSync('client.pfx') /// }; /// /// var cleartextStream = tls.connect(8000, options, function() { /// console.log('client connected', /// cleartextStream.authorized ? 'authorized' : 'unauthorized'); /// process.stdin.pipe(cleartextStream); /// process.stdin.resume(); /// }); /// cleartextStream.setEncoding('utf8'); /// cleartextStream.on('data', function(data) { /// console.log(data); /// }); /// cleartextStream.on('end', function() { /// server.close(); /// }); /// </code> /// </example> public CleartextStream connect(ConnectOptions options, JsAction callback) { return null; }