aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/sockets.classes.ts
diff options
context:
space:
mode:
authorGravatar Ciro Spaciari <ciro.spaciari@gmail.com> 2023-07-03 16:19:50 -0300
committerGravatar GitHub <noreply@github.com> 2023-07-03 12:19:50 -0700
commita7a01bd52f20e7908f06d4de9a1814902b838a4b (patch)
tree7c06354f17b98cb09eeb33c31dde70cb053bfa72 /src/bun.js/api/sockets.classes.ts
parent48d726bfd0701f8e33442f2c7075dc8191a2ccb4 (diff)
downloadbun-a7a01bd52f20e7908f06d4de9a1814902b838a4b.tar.gz
bun-a7a01bd52f20e7908f06d4de9a1814902b838a4b.tar.zst
bun-a7a01bd52f20e7908f06d4de9a1814902b838a4b.zip
[tls] add socket parameter, setServername and ALPNprotocols support (#3457)
* add socket parameter support * refactor #socket * add test and more fixs * some fixes * bump uws * handlers fix * more fixes * fix node net and node tls tests * fix duplicate port * fix deinit on CallbackJobs * cleanup * add setImmediate repro * add test to setImmediate * this is necessary? * fix prependOnce on native listener * try to findout the error on nodemailer CI * show error message * Update bun.lockb * prettier * Use exact versions of packages * add alpnProtocol support * update * emit error when connect fails on net.Socket * format * fix _write and cleanup * fixup * fix connect, add alpn test * fix socket.io * add socket parameter to TLSSocket * add TLSSocket socket first parameter * fixup and _start * remove flask tests * fmt --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/api/sockets.classes.ts')
-rw-r--r--src/bun.js/api/sockets.classes.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bun.js/api/sockets.classes.ts b/src/bun.js/api/sockets.classes.ts
index da07741a3..0c7847e19 100644
--- a/src/bun.js/api/sockets.classes.ts
+++ b/src/bun.js/api/sockets.classes.ts
@@ -15,10 +15,21 @@ function generate(ssl) {
authorized: {
getter: "getAuthorized",
},
+ alpnProtocol: {
+ getter: "getALPNProtocol",
+ },
write: {
fn: "write",
length: 3,
},
+ wrapTLS: {
+ fn: "wrapTLS",
+ length: 1,
+ },
+ open: {
+ fn: "open",
+ length: 0,
+ },
end: {
fn: "end",
length: 3,
@@ -82,6 +93,11 @@ function generate(ssl) {
fn: "reload",
length: 1,
},
+
+ setServername: {
+ fn: "setServername",
+ length: 1,
+ },
},
finalize: true,
construct: true,