Created Notes, Edited websocket_test.html
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>WebSocket Test</title>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
// Create WebSocket connection.
|
||||
const socket = new WebSocket('ws://localhost:9000');
|
||||
|
||||
@ -33,10 +34,15 @@
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2>WebSocket Test</h2>
|
||||
<input type="text" id="messageInput" placeholder="Type a message...">
|
||||
<textarea rows="4" cols="50" id="messageInput" placeholder="Type a message..."> </textarea>
|
||||
<button id="sendMessage">Send Message</button>
|
||||
<p>Example JSON</p>
|
||||
<p>{ "type": "cable_map", "call": "request", "data": { } }</p>
|
||||
<p>Messages/Logs</p>
|
||||
<ul id="messages"></ul>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user