oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.44k stars 2.7k forks source link

Support Socket access from `node:http` #11230

Open Electroid opened 4 months ago

Electroid commented 4 months ago

Currently, Bun implements the node:http module using the fetch() API under-the-hood.

https://github.com/oven-sh/bun/blob/b2b7ad235e0261ecf4213e11979f6d1054ff2547/src/js/node/http.ts#L1513-L1523

While this works for basic usage, there are more advanced APIs that we do not support, such as request.socket. Bun uses a no-op for some of these APIs, for now.

Instead, we should rewrite parts of the node:http implementation in native code so we can have better support.

Mrgaton commented 4 months ago

hope new version comes soon, but i know how slow is the process.

tnfAngel commented 3 months ago

same for me, hoping for a fix soon 👍