basic websocket test

This commit is contained in:
Moxie Marlinspike
2014-01-24 16:07:32 -08:00
parent 7bb505db4c
commit 866f8bf1ef
3 changed files with 120 additions and 2 deletions

View File

@@ -9,6 +9,13 @@ public class AcknowledgeWebsocketMessage extends IncomingWebsocketMessage {
@JsonProperty
private long id;
public AcknowledgeWebsocketMessage() {}
public AcknowledgeWebsocketMessage(long id) {
this.type = TYPE_ACKNOWLEDGE_MESSAGE;
this.id = id;
}
public long getId() {
return id;
}

View File

@@ -3,7 +3,7 @@ package org.whispersystems.textsecuregcm.entities;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
@JsonIgnoreProperties(ignoreUnknown = false)
@JsonIgnoreProperties(ignoreUnknown = true)
public class IncomingWebsocketMessage {
public static final int TYPE_ACKNOWLEDGE_MESSAGE = 1;
@@ -11,7 +11,7 @@ public class IncomingWebsocketMessage {
public static final int TYPE_PONG_MESSAGE = 3;
@JsonProperty
private int type;
protected int type;
public IncomingWebsocketMessage() {}