Browse Source

fix example code

pull/1164/head
Miguel Grinberg 1 year ago
parent
commit
7a1796cc96
Failed to extract signature
  1. 2
      examples/server/wsgi/templates/index.html

2
examples/server/wsgi/templates/index.html

@ -6,7 +6,7 @@
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/4.7.2/socket.io.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
var socket = io.connect({transports: ['websocket']});
var socket = io.connect();
socket.on('connect', function() {
socket.emit('my_event', {data: 'I\'m connected!'});

Loading…
Cancel
Save