function onConnectionOpened(socket, req) {
                socket.id = SA.projects.foundations.utilities.miscellaneousFunctions.genereteUniqueId()

                /** @type {Caller} */ let caller = {
                    id: socket.id,
                    isAlive: true,
                    socket,
                    userProfile: undefined,
                    userAppBlockchainAccount: undefined,
                    role: undefined
                }
                clients.set(socket, caller);

                caller.socket.on('close', onConnectionClosed)

                /* 
                 * Active bi-directional heartbeat of the websockets connection to detect and handle hidden connection drops 
                 */
                caller.socket.isAlive = true
                caller.socket.on('pong', heartbeat)

                let calledTimestamp = (new Date()).valueOf()

                caller.socket.on('message', onMessage)

                function onMessage(message) {
                    thisObject.socketInterfaces.onMessage(message, caller, calledTimestamp)
                }

                function heartbeat() {
                    caller.isAlive = true
                }

                function onConnectionClosed() {
                    thisObject.socketInterfaces.onConnectionClosed(caller.id)
                    clients.delete(socket)
                }
            }
This function is executed every time a new Websockets connection
is established

@param {WebSocket} socket