structured sockets in app and html