提交 7288f283 编写于 作者: X xujie

增加tls服务端md

Signed-off-by: Nxujie <xujie223@huawei.com>
上级 4d1cf7b3
...@@ -3873,9 +3873,8 @@ let options = { ...@@ -3873,9 +3873,8 @@ let options = {
cipherSuite: "AES256-SHA256", cipherSuite: "AES256-SHA256",
}, },
}; };
tlsServer.listen(options, (err, data) => { tlsServer.listen(options, err => {
console.error("listen callback error" + err); console.log("listen callback error" + err);
console.log(JSON.stringify(data));
}); });
``` ```
...@@ -3940,10 +3939,10 @@ let options = { ...@@ -3940,10 +3939,10 @@ let options = {
cipherSuite: "AES256-SHA256", cipherSuite: "AES256-SHA256",
}, },
}; };
tlsServer.listen(options).then(data => { tlsServer.listen(options).then(() => {
console.log(JSON.stringify(data)); console.log("listen callback success");
}).catch(err => { }).catch(err => {
console.error(err); console.log(err);
}); });
``` ```
...@@ -3991,9 +3990,8 @@ let options = { ...@@ -3991,9 +3990,8 @@ let options = {
cipherSuite: "AES256-SHA256", cipherSuite: "AES256-SHA256",
}, },
}; };
tlsServer.listen(options, (err, data) => { tlsServer.listen(options, err => {
console.error("listen callback error" + err); console.log("listen callback error" + err);
console.log(JSON.stringify(data));
}); });
tlsServer.getState((err, data) => { tlsServer.getState((err, data) => {
...@@ -4048,10 +4046,10 @@ let options = { ...@@ -4048,10 +4046,10 @@ let options = {
cipherSuite: "AES256-SHA256", cipherSuite: "AES256-SHA256",
}, },
}; };
tlsServer.listen(options).then(data => { tlsServer.listen(options).then(() => {
console.log(JSON.stringify(data)); console.log("listen callback success");
}).catch(err => { }).catch(err => {
console.error(err); console.log(err);
}); });
let promise = tlsServer.getState(); let promise = tlsServer.getState();
promise.then(() => { promise.then(() => {
...@@ -4106,9 +4104,8 @@ let options = { ...@@ -4106,9 +4104,8 @@ let options = {
cipherSuite: "AES256-SHA256", cipherSuite: "AES256-SHA256",
}, },
}; };
tlsServer.listen(options, (err, data) => { tlsServer.listen(options, err => {
console.error("listen callback error" + err); console.log("listen callback error" + err);
console.log(JSON.stringify(data));
}); });
tlsServer.setExtraOptions({ tlsServer.setExtraOptions({
keepAlive: true, keepAlive: true,
...@@ -4178,10 +4175,10 @@ let options = { ...@@ -4178,10 +4175,10 @@ let options = {
cipherSuite: "AES256-SHA256", cipherSuite: "AES256-SHA256",
}, },
}; };
tlsServer.listen(options).then(data => { tlsServer.listen(options).then(() => {
console.log(JSON.stringify(data)); console.log("listen callback success");
}).catch(err => { }).catch(err => {
console.error(err); console.log(err);
}); });
let promise = tlsServer.setExtraOptions({ let promise = tlsServer.setExtraOptions({
keepAlive: true, keepAlive: true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册