Plistener
Bun

property

Socket.listener

readonly listener?: SocketListener<undefined>

Get the server that created this socket

This will return undefined if the socket was created by Bun.connect or if the listener has already closed.