#Equivalent of Node's "req.socket"?
1 messages · Page 1 of 1 (latest)
This is on @crystal mirage's todo list to add a server.requestIp(request)
I'll add an issue for tracking it
Thank you Jarred!
we have some code for this but haven't turned it into a PR yet
No worries, that's really great to know
yeah someone else worked on it and almost got it finished but its like a couple inches away
and then some extra code to glue it to req.socket
Unscheduled workaround Hahahahahahah
the way node:http is done in bun is it uses Bun.serve
It is going to be like, a middleware to the fetch function, or some wild class attribute?
it reimplements the node:http's createServer using Bun.serve
that is how it works right now
Oh, I mean, the req.socket thing
idk right now but
i think the server is stored somehow with the request
It seems pretty straightforward I think, surely Zig must have some socket address/port attribute, then it is just going to be surfaced/accessed by Bun's