🙃
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
<script lang="ts">
|
||||
let socket = new WebSocket("ws://localhost:7050");
|
||||
|
||||
socket.onopen((event: Event) => {
|
||||
|
||||
});
|
||||
|
||||
socket.onmessage((event: MessageEvent) => {});
|
||||
const ws = new WebSocket("ws://127.0.0.1:7050");
|
||||
ws.onmessage = (e) => console.log("->", e.data);
|
||||
let input: string = "";
|
||||
</script>
|
||||
|
||||
<main>
|
||||
<h1>Lead</h1>
|
||||
<button onclick={() => ws.send(input)}>Send msg</button>
|
||||
<input bind:value={input} />
|
||||
</main>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user