Skip to content

Commit

Permalink
Merge pull request #191 from fleizean/spa
Browse files Browse the repository at this point in the history
ws
  • Loading branch information
yeaktas committed Mar 30, 2024
2 parents e30c09b + a3bd901 commit 98cae72
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 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('wss://' + window.location.host + '/ws/online_status/');
var socket = new WebSocket('ws://' + 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/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const sendButton = document.getElementById("send")
const inputField = document.getElementById("comment")


const chatsocket = new WebSocket("wss://" + window.location.host + "/ws/chat/" + roomName + "/")
const chatsocket = new WebSocket("ws://" + window.location.host + "/ws/chat/" + roomName + "/")

chatsocket.onopen = function (e) {
console.log("socket opened")
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(`wss://${window.location.host}/ws/remote-game/${gameType}/${gameId}/`); //? Maybe we need to pass game type and game id here
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 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 = 'wss://' + window.location.host + '/ws/rps/';
const wsEndpoint = 'ws://' + window.location.host + '/ws/rps/';
const websocket = new WebSocket(wsEndpoint);


Expand Down

0 comments on commit 98cae72

Please sign in to comment.