DRAG DROP
You are developing a web application that consumes data from a server named sample-host.The application must:
Open a WebSocket connection tosample-host
Return the status of the connection to the web page
You need to develop the application to meet the requirements.
Which code segment or segments should you use? (To answer, drag the appropriate code segment or
segments to the correct location or locations. Each code segment may be used once, more than once, or not at
all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:
Explanation:
Code Segment: var host =”ws://sample-host/echo”;
Segment:socket.onopen
https://docs.microsoft.com/en-us/microsoft-edge/dev-guide/networking-and-connectivity/
websocket
It is right