Show how to write a simple WebSocket server application.
This Echo Server shows how to create a simple server application that sends back a reply in response to a message it receives, using the WebSocket API. For the sake of illustration, the reply is simply a copy of the message.
若 Web 瀏覽器支持
WebSocket
,還能用它打開
echoserver/echoclient.html
{echoclient.html} file, and operate as shown in the following screenshot:
Otherwise use the WebSocket Echo Client to connect to the server.
另請參閱 WebSocket Echo Client .