method
net.BoundSocket.fd
Returns the file descriptor of the bound socket. Ownership remains with the BoundSocket, so the descriptor must not be closed by the caller. The descriptor is only available before the handle is adopted; afterwards it belongs to the adopting net.Server or net.Socket and fd() throws ERR_SOCKET_HANDLE_ADOPTED.
@returns
The underlying OS file descriptor, or -1 on platforms that do not expose one for sockets (such as Windows).