Copy-pasted the README.md quick example of ratchetphp/Ratchet
https://github.com/ratchetphp/Ratchet/tree/5012dc954541b40c5599d286fd40653f5716a38f#a-quick-example
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user