Copy-pasted the README.md
quick example of ratchetphp/Ratchet
5012dc9545 (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