Skip to content

Commit

Permalink
ping
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Ski committed Oct 25, 2024
1 parent 439c5ef commit ed35349
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ buildscript {
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "maven"
apply plugin: "maven-publish"

ext {
minSdk = 16
Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apply plugin: 'java-library'

dependencies {
api project(":core")
compile "com.neovisionaries:nv-websocket-client:$nvVersion"
api "com.neovisionaries:nv-websocket-client:$nvVersion"
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public void connect() throws WebSocketException {
try {
dispose();
final WebSocket currentWebSocket = webSocket = webSocketFactory.createSocket(getUrl());

webSocket.setPingInterval(5000);

currentWebSocket.addListener(new NvWebSocketListener(this));
currentWebSocket.connectAsynchronously();
} catch (final Throwable exception) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion ios/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ eclipse {

dependencies {
api project(":core")
compile "com.neovisionaries:nv-websocket-client:$nvVersion"
api "com.neovisionaries:nv-websocket-client:$nvVersion"
implementation "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
implementation "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
implementation "com.badlogicgames.gdx:gdx:$gdxVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ private void setSNIForSocket (Socket socket) {

public NvWebSocket(final String url) {
super(url);

webSocket.setPingInterval(5000);

webSocketFactory.setVerifyHostname(verifyHostname);
webSocketFactory.setSSLSocketFactory(new OpenSSLSocketFactoryImpl() {

Expand Down
2 changes: 1 addition & 1 deletion serialization/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ apply plugin: 'java-library'
dependencies {
implementation "com.badlogicgames.gdx:gdx:$gdxVersion"
api project(":core")
testCompile "junit:junit:4.12"
testImplementation "junit:junit:4.12"
}

0 comments on commit ed35349

Please sign in to comment.