Created Notes, Edited websocket_test.html

This commit is contained in:
Lucas
2024-03-08 21:35:21 -06:00
parent a6d557d1c6
commit 0b97079cfd
2 changed files with 22 additions and 7 deletions

View File

@ -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>