Copy-pasted the README.md quick example of ratchetphp/Ratchet

5012dc9545 (a-quick-example)
This commit is contained in:
2023-01-30 22:19:04 +01:00
parent 931b2df563
commit 0193f05143
4 changed files with 1467 additions and 0 deletions

View File

@@ -11,3 +11,10 @@ See <?php echoUrl('https://gitea.lemnoslife.com/Benjamin_Loison/YouTube_captions
<input type="text" pattern="[A-Za-z0-9]+" placeholder="Your alphanumeric search"></input>
<button>Search</button>
<script>
// Then some JavaScript in the browser:
var conn = new WebSocket('ws://localhost:8080/echo');
conn.onmessage = function(e) { console.log(e.data); };
conn.onopen = function(e) { conn.send('Hello Me!'); };
</script>