Includes Node.js module, built-in net . Here's how to track it:
The ws documentation refers to upgradeReq as "the HTTP request that initiated the upgrade." Looking through the ws code makes it clear that Node.js uses the http built-in library to process HTTP requests.
The Node.js http documentation says that http.ClientRequest.connection is a link to this request, which is the basis of TCP socket .
Node.js The TCP code is in the net library. net docs document socket.remoteAddress .
joews source share