If you wan to go further, you just need to figure out how to retrieve the connection on the ESP8266 side and answer to that request
Do you really need the complex Websocket protocol? Are plain sockets not an option? It would be much simpler, don't you think?