Skip to content

Commit

Permalink
Merge pull request #190 from fleizean/spa
Browse files Browse the repository at this point in the history
wss
  • Loading branch information
yeaktas authored Mar 30, 2024
2 parents 9202e77 + 45926aa commit e30c09b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion indianpong/pong/templates/_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</nav>
{% if not request.user.is_anonymous %}
<script>
var socket = new WebSocket('ws://' + window.location.host + '/ws/online_status/');
var socket = new WebSocket('wss://' + window.location.host + '/ws/online_status/');

socket.onopen = function(e) {
console.log('User is connected');
Expand Down
2 changes: 1 addition & 1 deletion indianpong/static/js/game/sockPong.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const gameId = pathArray[3]; // Assuming game_id is the fourth segment of the UR


// Connect to the WebSocket server using the extracted game_id and game_type
const matchsocket = new WebSocket(`ws://${window.location.host}/ws/remote-game/${gameType}/${gameId}/`); //? Maybe we need to pass game type and game id here
const matchsocket = new WebSocket(`wss://${window.location.host}/ws/remote-game/${gameType}/${gameId}/`); //? Maybe we need to pass game type and game id here


const canvas = document.getElementById('pongCanvas');
Expand Down
2 changes: 1 addition & 1 deletion indianpong/static/js/sockRps.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// rps.js

const wsEndpoint = 'ws://' + window.location.host + '/ws/rps/';
const wsEndpoint = 'wss://' + window.location.host + '/ws/rps/';
const websocket = new WebSocket(wsEndpoint);


Expand Down

0 comments on commit e30c09b

Please sign in to comment.