Skip to content

Commit

Permalink
send a message to kelder using socket test
Browse files Browse the repository at this point in the history
  • Loading branch information
xerbalind committed Oct 4, 2023
1 parent 140be07 commit 7b60241
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions content/cammie.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ title: Cammie
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.7.2/socket.io.js" integrity="sha256-ohm5bQuo4yRByZrO3JFkHnUxob0EsucKvzTA4ZUQ87g=" crossorigin="anonymous"></script>
<script type="text/javascript" charset="utf-8">
var socket = io("https://kelder.zeus.ugent.be");
var nsp = io.of("/messages");
nsp.emit("message",{username: "xander", message: "testje"});
socket.on('replymessage', function(obj) {
alert("Kelder says: " + obj['message']);
})
Expand Down

0 comments on commit 7b60241

Please sign in to comment.