boolean belongsTo(StableWebSocket socket) { return this.socket.getId().equals(socket.getId()); }
public void send(JSONObject msg) throws IOException { msg.put("$dst", peerId); msg.put("$src", id); socket.sendMessage(msg.toJSONString()); }
public static String makeUniqueId(StableWebSocket socket, String id) { return id + "@" + socket.getId(); }