2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/gateway/GatewaySocket$Companion;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "GatewaySocket.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/gateway/GatewaySocket;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x19
|
|
|
|
name = "Companion"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/gateway/GatewaySocket$Companion;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$log(Lcom/discord/gateway/GatewaySocket$Companion;Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Z)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/gateway/GatewaySocket$Companion;->log(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getDelay(JLjava/lang/Long;)J
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {}, Lcom/discord/utilities/time/ClockFactory;->get()Lcom/discord/utilities/time/Clock;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-interface {p3}, Lcom/discord/utilities/time/Clock;->currentTimeMillis()J
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
sub-long/2addr v0, p1
|
|
|
|
|
|
|
|
return-wide v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic getDelay$default(Lcom/discord/gateway/GatewaySocket$Companion;JLjava/lang/Long;ILjava/lang/Object;)J
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p4, p4, 0x2
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
const/4 p3, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/gateway/GatewaySocket$Companion;->getDelay(JLjava/lang/Long;)J
|
|
|
|
|
|
|
|
move-result-wide p0
|
|
|
|
|
|
|
|
return-wide p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final log(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Z)V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
const-string v0, "[GatewaySocket] "
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-static {v0, p2}, Lf/e/b/a/a;->q(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x2
|
|
|
|
|
|
|
|
invoke-static {p1, v0, v1, v2, v1}, Lcom/discord/utilities/logging/Logger;->v$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
const-string v0, "Gateway ["
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
const/16 p2, 0x5d
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
const-string p3, "log"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-virtual {p1, p2, p3}, Lcom/discord/utilities/logging/Logger;->recordBreadcrumb(Ljava/lang/String;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic log$default(Lcom/discord/gateway/GatewaySocket$Companion;Lcom/discord/utilities/logging/Logger;Ljava/lang/String;ZILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p4, p4, 0x2
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
const/4 p3, 0x1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/gateway/GatewaySocket$Companion;->log(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|