Skip to content

Commit

Permalink
Fixed console error "Websocket CLOSED or closing
Browse files Browse the repository at this point in the history
  • Loading branch information
NotVeridion committed Apr 23, 2024
1 parent 6db589d commit 49c2080
Show file tree
Hide file tree
Showing 20 changed files with 92 additions and 0 deletions.
2 changes: 2 additions & 0 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ <h1>LEADERBOARD</h1>
let currentUser = new UserEvent;
currentUser.UserId = this.UserId;

let connection = null;
let serverUrl;

serverUrl = "ws://" + window.location.hostname +":"+ (parseInt(location.port) + 100);
connection = new WebSocket(serverUrl);
Expand Down
Binary file added target/classes/com/cse3310/App.class
Binary file not shown.
Binary file added target/classes/com/cse3310/Coordinate.class
Binary file not shown.
Binary file added target/classes/com/cse3310/Game.class
Binary file not shown.
Binary file added target/classes/com/cse3310/HttpServer$1.class
Binary file not shown.
Binary file added target/classes/com/cse3310/HttpServer.class
Binary file not shown.
Binary file added target/classes/com/cse3310/Lobby.class
Binary file not shown.
Binary file added target/classes/com/cse3310/Locations.class
Binary file not shown.
Binary file added target/classes/com/cse3310/ServerEvent.class
Binary file not shown.
Binary file added target/classes/com/cse3310/User.class
Binary file not shown.
Binary file added target/classes/com/cse3310/UserEvent.class
Binary file not shown.
Binary file added target/cse3310-wordsearch.jar
Binary file not shown.
4 changes: 4 additions & 0 deletions target/maven-archiver/pom.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#Created by Apache Maven 3.6.3
groupId=com.cse3310_sp24_group26
artifactId=cse3310
version=wordsearch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
com/cse3310/Coordinate.class
com/cse3310/Locations.class
com/cse3310/ServerEvent.class
com/cse3310/HttpServer.class
com/cse3310/HttpServer$1.class
com/cse3310/Lobby.class
com/cse3310/UserEvent.class
com/cse3310/User.class
com/cse3310/App.class
com/cse3310/Game.class
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/ServerEvent.java
/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/User.java
/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/Locations.java
/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/App.java
/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/UserEvent.java
/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/HttpServer.java
/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/Game.java
/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/Lobby.java
/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/main/java/com/cse3310/Coordinate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com/cse3310/AppTest.class
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/src/test/java/com/cse3310/AppTest.java
61 changes: 61 additions & 0 deletions target/surefire-reports/TEST-com.cse3310.AppTest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="com.cse3310.AppTest" time="0.072" tests="1" errors="0" skipped="0" failures="0">
<properties>
<property name="awt.toolkit" value="sun.awt.X11.XToolkit"/>
<property name="exec.mainClass" value="com.cse3310.App"/>
<property name="java.specification.version" value="11"/>
<property name="sun.cpu.isalist" value=""/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.class.path" value="/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/target/test-classes:/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/target/classes:/home/veridion/.m2/repository/junit/junit/4.13.1/junit-4.13.1.jar:/home/veridion/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/veridion/.m2/repository/com/google/code/gson/gson/2.9.1/gson-2.9.1.jar:/home/veridion/.m2/repository/net/freeutils/jlhttp/2.6/jlhttp-2.6.jar:/home/veridion/.m2/repository/org/java-websocket/Java-WebSocket/1.5.4/Java-WebSocket-1.5.4.jar:/home/veridion/.m2/repository/org/slf4j/slf4j-api/2.0.6/slf4j-api-2.0.6.jar:"/>
<property name="java.vm.vendor" value="Ubuntu"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.vendor.url" value="https://ubuntu.com/"/>
<property name="user.timezone" value=""/>
<property name="java.vm.specification.version" value="11"/>
<property name="os.name" value="Linux"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="sun.boot.library.path" value="/usr/lib/jvm/java-11-openjdk-amd64/lib"/>
<property name="sun.java.command" value="/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/target/surefire/surefirebooter2670179808842976820.jar /mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/target/surefire 2024-04-23T00-16-44_938-jvmRun1 surefire5746889823032438464tmp surefire_01750200785988361130tmp"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/target/test-classes:/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/target/classes:/home/veridion/.m2/repository/junit/junit/4.13.1/junit-4.13.1.jar:/home/veridion/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/veridion/.m2/repository/com/google/code/gson/gson/2.9.1/gson-2.9.1.jar:/home/veridion/.m2/repository/net/freeutils/jlhttp/2.6/jlhttp-2.6.jar:/home/veridion/.m2/repository/org/java-websocket/Java-WebSocket/1.5.4/Java-WebSocket-1.5.4.jar:/home/veridion/.m2/repository/org/slf4j/slf4j-api/2.0.6/slf4j-api-2.0.6.jar:"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="/home/veridion"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2023-10-17"/>
<property name="java.home" value="/usr/lib/jvm/java-11-openjdk-amd64"/>
<property name="file.separator" value="/"/>
<property name="basedir" value="/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.awt.graphicsenv" value="sun.awt.X11GraphicsEnvironment"/>
<property name="surefire.real.class.path" value="/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26/target/surefire/surefirebooter2670179808842976820.jar"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="11.0.21+9-post-Ubuntu-0ubuntu122.04"/>
<property name="user.name" value="veridion"/>
<property name="path.separator" value=":"/>
<property name="os.version" value="4.4.0-19041-Microsoft"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="localRepository" value="/home/veridion/.m2/repository"/>
<property name="java.vendor.url.bug" value="https://bugs.launchpad.net/ubuntu/+source/openjdk-lts"/>
<property name="java.io.tmpdir" value="/tmp"/>
<property name="java.version" value="11.0.21"/>
<property name="user.dir" value="/mnt/c/Users/verid/OneDrive/Documents/School/Classes/CSE 3310 Software Engineering/cse3310_sp24_group_26"/>
<property name="os.arch" value="amd64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="java.awt.printerjob" value="sun.print.PSPrinterJob"/>
<property name="sun.os.patch.level" value="unknown"/>
<property name="java.library.path" value="/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib"/>
<property name="java.vm.info" value="mixed mode, sharing"/>
<property name="java.vendor" value="Ubuntu"/>
<property name="java.vm.version" value="11.0.21+9-post-Ubuntu-0ubuntu122.04"/>
<property name="java.specification.maintenance.version" value="2"/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="java.class.version" value="55.0"/>
</properties>
<testcase name="shouldAnswerWithTrue" classname="com.cse3310.AppTest" time="0.004"/>
</testsuite>
4 changes: 4 additions & 0 deletions target/surefire-reports/com.cse3310.AppTest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-------------------------------------------------------------------------------
Test set: com.cse3310.AppTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.072 s - in com.cse3310.AppTest
Binary file added target/test-classes/com/cse3310/AppTest.class
Binary file not shown.

0 comments on commit 49c2080

Please sign in to comment.