Http2Connection.smali
.class public final Lokhttp3/internal/http2/Http2Connection;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/io/Closeable;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/http2/Http2Connection$Builder;,
Lokhttp3/internal/http2/Http2Connection$Listener;,
Lokhttp3/internal/http2/Http2Connection$PingRunnable;,
Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
}
.end annotation
# static fields
.field public static final synthetic $assertionsDisabled:Z = false
.field public static final OKHTTP_CLIENT_WINDOW_SIZE:I = 0x1000000
.field private static final listenerExecutor:Ljava/util/concurrent/ExecutorService;
.field private static pushExecutor:Ljava/util/concurrent/ExecutorService;
.field private static readExecutor:Ljava/util/concurrent/ExecutorService;
.field private static writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
# instance fields
.field private awaitingPong:Z
.field public bytesLeftInWriteWindow:J
.field public final client:Z
.field public final currentPushRequests:Ljava/util/Set;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Set<",
"Ljava/lang/Integer;",
">;"
}
.end annotation
.end field
.field public final hostname:Ljava/lang/String;
.field public lastGoodStreamId:I
.field public final listener:Lokhttp3/internal/http2/Http2Connection$Listener;
.field public nextStreamId:I
.field public okHttpSettings:Lokhttp3/internal/http2/Settings;
.field public final peerSettings:Lokhttp3/internal/http2/Settings;
.field public final pushObserver:Lokhttp3/internal/http2/PushObserver;
.field public final readerRunnable:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
.field public receivedInitialPeerSettings:Z
.field public shutdown:Z
.field public final socket:Ljava/net/Socket;
.field public final streams:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/Integer;",
"Lokhttp3/internal/http2/Http2Stream;",
">;"
}
.end annotation
.end field
.field public unacknowledgedBytesRead:J
.field public final writer:Lokhttp3/internal/http2/Http2Writer;
# direct methods
.method public static constructor <clinit>()V
.registers 9
.line 1
const-class v0, Lokhttp3/internal/http2/Http2Connection;
const/4 v1, 0x0
const v2, 0x7fffffff
const-wide/16 v3, 0x3c
.line 2
sget-object v5, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
new-instance v6, Ljava/util/concurrent/SynchronousQueue;
invoke-direct {v6}, Ljava/util/concurrent/SynchronousQueue;-><init>()V
const/4 v0, 0x1
const-string v7, "OkHttp Http2Connection"
.line 3
invoke-static {v7, v0}, Lokhttp3/internal/Util;->threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
move-result-object v7
const-string v8, "okhttp3/internal/http2/Http2Connection"
invoke-static/range {v1 .. v8}, Lcom/garena/android/appkit/logging/a;->R(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;Ljava/lang/String;)Ljava/util/concurrent/ThreadPoolExecutor;
move-result-object v0
sput-object v0, Lokhttp3/internal/http2/Http2Connection;->listenerExecutor:Ljava/util/concurrent/ExecutorService;
return-void
.end method
.method public constructor <init>(Lokhttp3/internal/http2/Http2Connection$Builder;)V
.registers 15
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
new-instance v0, Ljava/util/LinkedHashMap;
invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V
iput-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
const-wide/16 v0, 0x0
.line 3
iput-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->unacknowledgedBytesRead:J
.line 4
new-instance v0, Lokhttp3/internal/http2/Settings;
invoke-direct {v0}, Lokhttp3/internal/http2/Settings;-><init>()V
iput-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
.line 5
new-instance v0, Lokhttp3/internal/http2/Settings;
invoke-direct {v0}, Lokhttp3/internal/http2/Settings;-><init>()V
iput-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->peerSettings:Lokhttp3/internal/http2/Settings;
const/4 v1, 0x0
.line 6
iput-boolean v1, p0, Lokhttp3/internal/http2/Http2Connection;->receivedInitialPeerSettings:Z
.line 7
new-instance v2, Ljava/util/LinkedHashSet;
invoke-direct {v2}, Ljava/util/LinkedHashSet;-><init>()V
iput-object v2, p0, Lokhttp3/internal/http2/Http2Connection;->currentPushRequests:Ljava/util/Set;
.line 8
iget-object v2, p1, Lokhttp3/internal/http2/Http2Connection$Builder;->pushObserver:Lokhttp3/internal/http2/PushObserver;
iput-object v2, p0, Lokhttp3/internal/http2/Http2Connection;->pushObserver:Lokhttp3/internal/http2/PushObserver;
.line 9
iget-boolean v2, p1, Lokhttp3/internal/http2/Http2Connection$Builder;->client:Z
iput-boolean v2, p0, Lokhttp3/internal/http2/Http2Connection;->client:Z
.line 10
iget-object v3, p1, Lokhttp3/internal/http2/Http2Connection$Builder;->listener:Lokhttp3/internal/http2/Http2Connection$Listener;
iput-object v3, p0, Lokhttp3/internal/http2/Http2Connection;->listener:Lokhttp3/internal/http2/Http2Connection$Listener;
const/4 v3, 0x2
const/4 v4, 0x1
if-eqz v2, :cond_38
const/4 v5, 0x1
goto :goto_39
:cond_38
const/4 v5, 0x2
.line 11
:goto_39
iput v5, p0, Lokhttp3/internal/http2/Http2Connection;->nextStreamId:I
if-eqz v2, :cond_40
add-int/2addr v5, v3
.line 12
iput v5, p0, Lokhttp3/internal/http2/Http2Connection;->nextStreamId:I
:cond_40
const/4 v3, 0x7
if-eqz v2, :cond_4a
.line 13
iget-object v5, p0, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
const/high16 v6, 0x1000000
invoke-virtual {v5, v3, v6}, Lokhttp3/internal/http2/Settings;->set(II)Lokhttp3/internal/http2/Settings;
.line 14
:cond_4a
iget-object v5, p1, Lokhttp3/internal/http2/Http2Connection$Builder;->hostname:Ljava/lang/String;
iput-object v5, p0, Lokhttp3/internal/http2/Http2Connection;->hostname:Ljava/lang/String;
.line 15
sget-object v5, Lokhttp3/internal/http2/Http2Connection;->writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
if-nez v5, :cond_5f
.line 16
new-instance v5, Ljava/util/concurrent/ScheduledThreadPoolExecutor;
const-string v6, "OkHttp Writer"
.line 17
invoke-static {v6, v1}, Lokhttp3/internal/Util;->threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
move-result-object v6
invoke-direct {v5, v1, v6}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;-><init>(ILjava/util/concurrent/ThreadFactory;)V
sput-object v5, Lokhttp3/internal/http2/Http2Connection;->writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
.line 18
:cond_5f
iget v5, p1, Lokhttp3/internal/http2/Http2Connection$Builder;->pingIntervalMillis:I
if-eqz v5, :cond_73
.line 19
sget-object v6, Lokhttp3/internal/http2/Http2Connection;->writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
new-instance v7, Lokhttp3/internal/http2/Http2Connection$PingRunnable;
invoke-direct {v7, p0, v1, v1, v1}, Lokhttp3/internal/http2/Http2Connection$PingRunnable;-><init>(Lokhttp3/internal/http2/Http2Connection;ZII)V
iget v1, p1, Lokhttp3/internal/http2/Http2Connection$Builder;->pingIntervalMillis:I
int-to-long v8, v1
int-to-long v10, v1
sget-object v12, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invoke-interface/range {v6 .. v12}, Ljava/util/concurrent/ScheduledExecutorService;->scheduleAtFixedRate(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
.line 20
:cond_73
sget-object v1, Lokhttp3/internal/http2/Http2Connection;->pushExecutor:Ljava/util/concurrent/ExecutorService;
if-nez v1, :cond_93
const/4 v5, 0x0
.line 21
invoke-static {}, Lokhttp3/InternalSetting;->getPushExecutorMaxThread()I
move-result v6
const-wide/16 v7, 0x3c
sget-object v9, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
new-instance v10, Ljava/util/concurrent/LinkedBlockingQueue;
invoke-direct {v10}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V
const-string v1, "OkHttp Push Observer"
.line 22
invoke-static {v1, v4}, Lokhttp3/internal/Util;->threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
move-result-object v11
const-string v12, "okhttp3/internal/http2/Http2Connection"
invoke-static/range {v5 .. v12}, Lcom/garena/android/appkit/logging/a;->R(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;Ljava/lang/String;)Ljava/util/concurrent/ThreadPoolExecutor;
move-result-object v1
sput-object v1, Lokhttp3/internal/http2/Http2Connection;->pushExecutor:Ljava/util/concurrent/ExecutorService;
.line 23
:cond_93
sget-object v1, Lokhttp3/internal/http2/Http2Connection;->readExecutor:Ljava/util/concurrent/ExecutorService;
if-nez v1, :cond_b2
const/4 v5, 0x0
const v6, 0x7fffffff
const-wide/16 v7, 0x3c
.line 24
sget-object v9, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
new-instance v10, Ljava/util/concurrent/SynchronousQueue;
invoke-direct {v10}, Ljava/util/concurrent/SynchronousQueue;-><init>()V
const-string v1, "OkHttp Read Executor"
.line 25
invoke-static {v1, v4}, Lokhttp3/internal/Util;->threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
move-result-object v11
const-string v12, "okhttp3/internal/http2/Http2Connection"
invoke-static/range {v5 .. v12}, Lcom/garena/android/appkit/logging/a;->R(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;Ljava/lang/String;)Ljava/util/concurrent/ThreadPoolExecutor;
move-result-object v1
sput-object v1, Lokhttp3/internal/http2/Http2Connection;->readExecutor:Ljava/util/concurrent/ExecutorService;
:cond_b2
const v1, 0xffff
.line 26
invoke-virtual {v0, v3, v1}, Lokhttp3/internal/http2/Settings;->set(II)Lokhttp3/internal/http2/Settings;
const/4 v1, 0x5
const/16 v3, 0x4000
.line 27
invoke-virtual {v0, v1, v3}, Lokhttp3/internal/http2/Settings;->set(II)Lokhttp3/internal/http2/Settings;
.line 28
invoke-virtual {v0}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
move-result v0
int-to-long v0, v0
iput-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->bytesLeftInWriteWindow:J
.line 29
iget-object v0, p1, Lokhttp3/internal/http2/Http2Connection$Builder;->socket:Ljava/net/Socket;
iput-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->socket:Ljava/net/Socket;
.line 30
new-instance v0, Lokhttp3/internal/http2/Http2Writer;
iget-object v1, p1, Lokhttp3/internal/http2/Http2Connection$Builder;->sink:Lokio/c;
invoke-direct {v0, v1, v2}, Lokhttp3/internal/http2/Http2Writer;-><init>(Lokio/c;Z)V
iput-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 31
new-instance v0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
new-instance v1, Lokhttp3/internal/http2/Http2Reader;
iget-object p1, p1, Lokhttp3/internal/http2/Http2Connection$Builder;->source:Lokio/d;
invoke-direct {v1, p1, v2}, Lokhttp3/internal/http2/Http2Reader;-><init>(Lokio/d;Z)V
invoke-direct {v0, p0, v1}, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;-><init>(Lokhttp3/internal/http2/Http2Connection;Lokhttp3/internal/http2/Http2Reader;)V
iput-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->readerRunnable:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
return-void
.end method
.method public static INVOKEINTERFACE_okhttp3_internal_http2_Http2Connection_com_shopee_app_asm_anr_threadpool_ExecutorProxy_execute(Ljava/util/concurrent/ExecutorService;Ljava/lang/Runnable;)V
.registers 4
.line 1
invoke-static {}, Lcom/shopee/app/asm/anr/threadpool/c;->b()Z
move-result v0
if-eqz v0, :cond_3a
invoke-static {}, Lcom/shopee/app/asm/anr/threadpool/c;->a()Z
move-result v0
if-eqz v0, :cond_3a
.line 2
:try_start_c
sget-object v0, Lcom/shopee/app/asm/anr/threadpool/c;->a:Landroid/os/HandlerThread;
.line 3
sget-object v0, Lcom/shopee/app/asm/anr/threadpool/c;->b:Landroid/os/Handler;
new-instance v1, Lcom/shopee/app/asm/anr/threadpool/a$b;
invoke-direct {v1, p0, p1}, Lcom/shopee/app/asm/anr/threadpool/a$b;-><init>(Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
:try_end_18
.catchall {:try_start_c .. :try_end_18} :catchall_19
goto :goto_54
:catchall_19
move-exception v0
.line 4
invoke-virtual {v0}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
sget-object v0, Lcom/shopee/app/asm/anr/threadpool/c;->a:Landroid/os/HandlerThread;
.line 5
:try_start_1f
invoke-static {p1, p0}, Lcom/shopee/app/asm/anr/threadpool/a;->a(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2b
.line 6
sget-object p0, Lcom/shopee/app/asm/fix/threadpool/global/i;->e:Lcom/shopee/app/asm/fix/threadpool/global/j;
.line 7
invoke-virtual {p0, p1}, Lcom/shopee/app/asm/anr/threadpool/b;->execute(Ljava/lang/Runnable;)V
return-void
.line 8
:cond_2b
invoke-interface {p0, p1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_2e
.catchall {:try_start_1f .. :try_end_2e} :catchall_2f
goto :goto_54
:catchall_2f
move-exception p0
.line 9
sget-object p1, Lcom/shopee/app/asm/anr/threadpool/c;->a:Landroid/os/HandlerThread;
.line 10
invoke-static {}, Lcom/shopee/app/apm/c;->d()Lcom/shopee/app/apm/nonfatal/a;
move-result-object p1
invoke-virtual {p1, p0}, Lcom/shopee/app/apm/nonfatal/a;->c(Ljava/lang/Throwable;)V
goto :goto_54
.line 11
:cond_3a
:try_start_3a
invoke-static {p1, p0}, Lcom/shopee/app/asm/anr/threadpool/a;->a(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_46
.line 12
sget-object p0, Lcom/shopee/app/asm/fix/threadpool/global/i;->e:Lcom/shopee/app/asm/fix/threadpool/global/j;
.line 13
invoke-virtual {p0, p1}, Lcom/shopee/app/asm/anr/threadpool/b;->execute(Ljava/lang/Runnable;)V
return-void
.line 14
:cond_46
invoke-interface {p0, p1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_49
.catchall {:try_start_3a .. :try_end_49} :catchall_4a
goto :goto_54
:catchall_4a
move-exception p0
.line 15
sget-object p1, Lcom/shopee/app/asm/anr/threadpool/c;->a:Landroid/os/HandlerThread;
.line 16
invoke-static {}, Lcom/shopee/app/apm/c;->d()Lcom/shopee/app/apm/nonfatal/a;
move-result-object p1
invoke-virtual {p1, p0}, Lcom/shopee/app/apm/nonfatal/a;->c(Ljava/lang/Throwable;)V
:goto_54
return-void
.end method
.method public static INVOKEINTERFACE_okhttp3_internal_http2_Http2Connection_com_shopee_app_asm_anr_threadpool_ExecutorProxy_execute(Ljava/util/concurrent/ScheduledExecutorService;Ljava/lang/Runnable;)V
.registers 4
.line 17
invoke-static {}, Lcom/shopee/app/asm/anr/threadpool/c;->b()Z
move-result v0
if-eqz v0, :cond_3a
invoke-static {}, Lcom/shopee/app/asm/anr/threadpool/c;->a()Z
move-result v0
if-eqz v0, :cond_3a
.line 18
:try_start_c
sget-object v0, Lcom/shopee/app/asm/anr/threadpool/c;->a:Landroid/os/HandlerThread;
.line 19
sget-object v0, Lcom/shopee/app/asm/anr/threadpool/c;->b:Landroid/os/Handler;
new-instance v1, Lcom/shopee/app/asm/anr/threadpool/a$b;
invoke-direct {v1, p0, p1}, Lcom/shopee/app/asm/anr/threadpool/a$b;-><init>(Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
:try_end_18
.catchall {:try_start_c .. :try_end_18} :catchall_19
goto :goto_54
:catchall_19
move-exception v0
.line 20
invoke-virtual {v0}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
sget-object v0, Lcom/shopee/app/asm/anr/threadpool/c;->a:Landroid/os/HandlerThread;
.line 21
:try_start_1f
invoke-static {p1, p0}, Lcom/shopee/app/asm/anr/threadpool/a;->a(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2b
.line 22
sget-object p0, Lcom/shopee/app/asm/fix/threadpool/global/i;->e:Lcom/shopee/app/asm/fix/threadpool/global/j;
.line 23
invoke-virtual {p0, p1}, Lcom/shopee/app/asm/anr/threadpool/b;->execute(Ljava/lang/Runnable;)V
return-void
.line 24
:cond_2b
invoke-interface {p0, p1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_2e
.catchall {:try_start_1f .. :try_end_2e} :catchall_2f
goto :goto_54
:catchall_2f
move-exception p0
.line 25
sget-object p1, Lcom/shopee/app/asm/anr/threadpool/c;->a:Landroid/os/HandlerThread;
.line 26
invoke-static {}, Lcom/shopee/app/apm/c;->d()Lcom/shopee/app/apm/nonfatal/a;
move-result-object p1
invoke-virtual {p1, p0}, Lcom/shopee/app/apm/nonfatal/a;->c(Ljava/lang/Throwable;)V
goto :goto_54
.line 27
:cond_3a
:try_start_3a
invoke-static {p1, p0}, Lcom/shopee/app/asm/anr/threadpool/a;->a(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_46
.line 28
sget-object p0, Lcom/shopee/app/asm/fix/threadpool/global/i;->e:Lcom/shopee/app/asm/fix/threadpool/global/j;
.line 29
invoke-virtual {p0, p1}, Lcom/shopee/app/asm/anr/threadpool/b;->execute(Ljava/lang/Runnable;)V
return-void
.line 30
:cond_46
invoke-interface {p0, p1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_49
.catchall {:try_start_3a .. :try_end_49} :catchall_4a
goto :goto_54
:catchall_4a
move-exception p0
.line 31
sget-object p1, Lcom/shopee/app/asm/anr/threadpool/c;->a:Landroid/os/HandlerThread;
.line 32
invoke-static {}, Lcom/shopee/app/apm/c;->d()Lcom/shopee/app/apm/nonfatal/a;
move-result-object p1
invoke-virtual {p1, p0}, Lcom/shopee/app/apm/nonfatal/a;->c(Ljava/lang/Throwable;)V
:goto_54
return-void
.end method
.method public static synthetic access$000(Lokhttp3/internal/http2/Http2Connection;)V
.registers 1
invoke-direct {p0}, Lokhttp3/internal/http2/Http2Connection;->failConnection()V
return-void
.end method
.method public static synthetic access$100()Ljava/util/concurrent/ExecutorService;
.registers 1
sget-object v0, Lokhttp3/internal/http2/Http2Connection;->listenerExecutor:Ljava/util/concurrent/ExecutorService;
return-object v0
.end method
.method public static synthetic access$200()Ljava/util/concurrent/ScheduledExecutorService;
.registers 1
sget-object v0, Lokhttp3/internal/http2/Http2Connection;->writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
return-object v0
.end method
.method public static synthetic access$302(Lokhttp3/internal/http2/Http2Connection;Z)Z
.registers 2
iput-boolean p1, p0, Lokhttp3/internal/http2/Http2Connection;->awaitingPong:Z
return p1
.end method
.method private failConnection()V
.registers 2
:try_start_0
sget-object v0, Lokhttp3/internal/http2/ErrorCode;->PROTOCOL_ERROR:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {p0, v0, v0}, Lokhttp3/internal/http2/Http2Connection;->close(Lokhttp3/internal/http2/ErrorCode;Lokhttp3/internal/http2/ErrorCode;)V
:try_end_5
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_5} :catch_5
:catch_5
return-void
.end method
.method private newStream(ILjava/util/List;Z)Lokhttp3/internal/http2/Http2Stream;
.registers 14
.annotation system Ldalvik/annotation/Signature;
value = {
"(I",
"Ljava/util/List<",
"Lokhttp3/internal/http2/Header;",
">;Z)",
"Lokhttp3/internal/http2/Http2Stream;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
xor-int/lit8 v6, p3, 0x1
const/4 v4, 0x0
.line 2
iget-object v7, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
monitor-enter v7
.line 3
:try_start_6
monitor-enter p0
:try_end_7
.catchall {:try_start_6 .. :try_end_7} :catchall_76
.line 4
:try_start_7
iget v0, p0, Lokhttp3/internal/http2/Http2Connection;->nextStreamId:I
const v1, 0x3fffffff # 1.9999999f
if-le v0, v1, :cond_13
.line 5
sget-object v0, Lokhttp3/internal/http2/ErrorCode;->REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Http2Connection;->shutdown(Lokhttp3/internal/http2/ErrorCode;)V
.line 6
:cond_13
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
if-nez v0, :cond_6d
.line 7
iget v8, p0, Lokhttp3/internal/http2/Http2Connection;->nextStreamId:I
add-int/lit8 v0, v8, 0x2
.line 8
iput v0, p0, Lokhttp3/internal/http2/Http2Connection;->nextStreamId:I
.line 9
new-instance v9, Lokhttp3/internal/http2/Http2Stream;
const/4 v5, 0x0
move-object v0, v9
move v1, v8
move-object v2, p0
move v3, v6
invoke-direct/range {v0 .. v5}, Lokhttp3/internal/http2/Http2Stream;-><init>(ILokhttp3/internal/http2/Http2Connection;ZZLokhttp3/Headers;)V
if-eqz p3, :cond_3a
.line 10
iget-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->bytesLeftInWriteWindow:J
const-wide/16 v2, 0x0
cmp-long p3, v0, v2
if-eqz p3, :cond_3a
iget-wide v0, v9, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
cmp-long p3, v0, v2
if-nez p3, :cond_38
goto :goto_3a
:cond_38
const/4 p3, 0x0
goto :goto_3b
:cond_3a
:goto_3a
const/4 p3, 0x1
.line 11
:goto_3b
invoke-virtual {v9}, Lokhttp3/internal/http2/Http2Stream;->isOpen()Z
move-result v0
if-eqz v0, :cond_4a
.line 12
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
invoke-interface {v0, v1, v9}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 13
:cond_4a
monitor-exit p0
:try_end_4b
.catchall {:try_start_7 .. :try_end_4b} :catchall_73
if-nez p1, :cond_53
.line 14
:try_start_4d
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
invoke-virtual {v0, v6, v8, p1, p2}, Lokhttp3/internal/http2/Http2Writer;->synStream(ZIILjava/util/List;)V
goto :goto_5c
.line 15
:cond_53
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Connection;->client:Z
if-nez v0, :cond_65
.line 16
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
invoke-virtual {v0, p1, v8, p2}, Lokhttp3/internal/http2/Http2Writer;->pushPromise(IILjava/util/List;)V
.line 17
:goto_5c
monitor-exit v7
:try_end_5d
.catchall {:try_start_4d .. :try_end_5d} :catchall_76
if-eqz p3, :cond_64
.line 18
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Writer;->flush()V
:cond_64
return-object v9
.line 19
:cond_65
:try_start_65
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "client streams shouldn\'t have associated stream IDs"
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:try_end_6d
.catchall {:try_start_65 .. :try_end_6d} :catchall_76
.line 20
:cond_6d
:try_start_6d
new-instance p1, Lokhttp3/internal/http2/ConnectionShutdownException;
invoke-direct {p1}, Lokhttp3/internal/http2/ConnectionShutdownException;-><init>()V
throw p1
:catchall_73
move-exception p1
.line 21
monitor-exit p0
:try_end_75
.catchall {:try_start_6d .. :try_end_75} :catchall_73
:try_start_75
throw p1
:catchall_76
move-exception p1
.line 22
monitor-exit v7
:try_end_78
.catchall {:try_start_75 .. :try_end_78} :catchall_76
throw p1
.end method
.method private declared-synchronized pushExecutorExecute(Lokhttp3/internal/NamedRunnable;)V
.registers 3
monitor-enter p0
.line 1
:try_start_1
invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Connection;->isShutdown()Z
move-result v0
if-nez v0, :cond_c
.line 2
sget-object v0, Lokhttp3/internal/http2/Http2Connection;->pushExecutor:Ljava/util/concurrent/ExecutorService;
invoke-static {v0, p1}, Lokhttp3/internal/http2/Http2Connection;->INVOKEINTERFACE_okhttp3_internal_http2_Http2Connection_com_shopee_app_asm_anr_threadpool_ExecutorProxy_execute(Ljava/util/concurrent/ExecutorService;Ljava/lang/Runnable;)V
:try_end_c
.catchall {:try_start_1 .. :try_end_c} :catchall_e
.line 3
:cond_c
monitor-exit p0
return-void
:catchall_e
move-exception p1
monitor-exit p0
throw p1
.end method
# virtual methods
.method public declared-synchronized awaitPong()V
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/InterruptedException;
}
.end annotation
monitor-enter p0
.line 1
:goto_1
:try_start_1
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Connection;->awaitingPong:Z
if-eqz v0, :cond_9
.line 2
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
:try_end_8
.catchall {:try_start_1 .. :try_end_8} :catchall_b
goto :goto_1
.line 3
:cond_9
monitor-exit p0
return-void
:catchall_b
move-exception v0
monitor-exit p0
throw v0
.end method
.method public close()V
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
sget-object v0, Lokhttp3/internal/http2/ErrorCode;->NO_ERROR:Lokhttp3/internal/http2/ErrorCode;
sget-object v1, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {p0, v0, v1}, Lokhttp3/internal/http2/Http2Connection;->close(Lokhttp3/internal/http2/ErrorCode;Lokhttp3/internal/http2/ErrorCode;)V
return-void
.end method
.method public close(Lokhttp3/internal/http2/ErrorCode;Lokhttp3/internal/http2/ErrorCode;)V
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x0
.line 2
:try_start_1
invoke-virtual {p0, p1}, Lokhttp3/internal/http2/Http2Connection;->shutdown(Lokhttp3/internal/http2/ErrorCode;)V
:try_end_4
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_4} :catch_6
move-object p1, v0
goto :goto_7
:catch_6
move-exception p1
.line 3
:goto_7
monitor-enter p0
.line 4
:try_start_8
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-interface {v1}, Ljava/util/Map;->isEmpty()Z
move-result v1
if-nez v1, :cond_29
.line 5
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;
move-result-object v0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-interface {v1}, Ljava/util/Map;->size()I
move-result v1
new-array v1, v1, [Lokhttp3/internal/http2/Http2Stream;
invoke-interface {v0, v1}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lokhttp3/internal/http2/Http2Stream;
.line 6
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-interface {v1}, Ljava/util/Map;->clear()V
.line 7
:cond_29
monitor-exit p0
:try_end_2a
.catchall {:try_start_8 .. :try_end_2a} :catchall_52
if-eqz v0, :cond_3d
.line 8
array-length v1, v0
const/4 v2, 0x0
:goto_2e
if-ge v2, v1, :cond_3d
aget-object v3, v0, v2
.line 9
:try_start_32
invoke-virtual {v3, p2}, Lokhttp3/internal/http2/Http2Stream;->close(Lokhttp3/internal/http2/ErrorCode;)V
:try_end_35
.catch Ljava/io/IOException; {:try_start_32 .. :try_end_35} :catch_36
goto :goto_3a
:catch_36
move-exception v3
if-eqz p1, :cond_3a
move-object p1, v3
:cond_3a
:goto_3a
add-int/lit8 v2, v2, 0x1
goto :goto_2e
.line 10
:cond_3d
:try_start_3d
iget-object p2, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
invoke-virtual {p2}, Lokhttp3/internal/http2/Http2Writer;->close()V
:try_end_42
.catch Ljava/io/IOException; {:try_start_3d .. :try_end_42} :catch_43
goto :goto_47
:catch_43
move-exception p2
if-nez p1, :cond_47
move-object p1, p2
.line 11
:cond_47
:goto_47
:try_start_47
iget-object p2, p0, Lokhttp3/internal/http2/Http2Connection;->socket:Ljava/net/Socket;
invoke-virtual {p2}, Ljava/net/Socket;->close()V
:try_end_4c
.catch Ljava/io/IOException; {:try_start_47 .. :try_end_4c} :catch_4d
goto :goto_4e
:catch_4d
move-exception p1
:goto_4e
if-nez p1, :cond_51
return-void
.line 12
:cond_51
throw p1
:catchall_52
move-exception p1
.line 13
:try_start_53
monitor-exit p0
:try_end_54
.catchall {:try_start_53 .. :try_end_54} :catchall_52
throw p1
.end method
.method public flush()V
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Writer;->flush()V
return-void
.end method
.method public getProtocol()Lokhttp3/Protocol;
.registers 2
sget-object v0, Lokhttp3/Protocol;->HTTP_2:Lokhttp3/Protocol;
return-object v0
.end method
.method public declared-synchronized getStream(I)Lokhttp3/internal/http2/Http2Stream;
.registers 3
monitor-enter p0
:try_start_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Lokhttp3/internal/http2/Http2Stream;
:try_end_d
.catchall {:try_start_1 .. :try_end_d} :catchall_f
monitor-exit p0
return-object p1
:catchall_f
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized isShutdown()Z
.registers 2
monitor-enter p0
:try_start_1
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
:try_end_3
.catchall {:try_start_1 .. :try_end_3} :catchall_5
monitor-exit p0
return v0
:catchall_5
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized maxConcurrentStreams()I
.registers 3
monitor-enter p0
:try_start_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->peerSettings:Lokhttp3/internal/http2/Settings;
const v1, 0x7fffffff
invoke-virtual {v0, v1}, Lokhttp3/internal/http2/Settings;->getMaxConcurrentStreams(I)I
move-result v0
:try_end_a
.catchall {:try_start_1 .. :try_end_a} :catchall_c
monitor-exit p0
return v0
:catchall_c
move-exception v0
monitor-exit p0
throw v0
.end method
.method public newStream(Ljava/util/List;Z)Lokhttp3/internal/http2/Http2Stream;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lokhttp3/internal/http2/Header;",
">;Z)",
"Lokhttp3/internal/http2/Http2Stream;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x0
.line 1
invoke-direct {p0, v0, p1, p2}, Lokhttp3/internal/http2/Http2Connection;->newStream(ILjava/util/List;Z)Lokhttp3/internal/http2/Http2Stream;
move-result-object p1
return-object p1
.end method
.method public declared-synchronized openStreamCount()I
.registers 2
monitor-enter p0
:try_start_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-interface {v0}, Ljava/util/Map;->size()I
move-result v0
:try_end_7
.catchall {:try_start_1 .. :try_end_7} :catchall_9
monitor-exit p0
return v0
:catchall_9
move-exception v0
monitor-exit p0
throw v0
.end method
.method public pushDataLater(ILokio/d;IZ)V
.registers 13
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
new-instance v5, Lokio/b;
invoke-direct {v5}, Lokio/b;-><init>()V
int-to-long v0, p3
.line 2
invoke-interface {p2, v0, v1}, Lokio/d;->y0(J)V
.line 3
invoke-interface {p2, v5, v0, v1}, Lokio/w;->read(Lokio/b;J)J
.line 4
iget-wide v2, v5, Lokio/b;->b:J
cmp-long p2, v2, v0
if-nez p2, :cond_31
.line 5
new-instance p2, Lokhttp3/internal/http2/Http2Connection$5;
const/4 v0, 0x2
new-array v3, v0, [Ljava/lang/Object;
const/4 v0, 0x0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection;->hostname:Ljava/lang/String;
aput-object v1, v3, v0
const/4 v0, 0x1
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v3, v0
const-string v2, "OkHttp %s Push Data[%s]"
move-object v0, p2
move-object v1, p0
move v4, p1
move v6, p3
move v7, p4
invoke-direct/range {v0 .. v7}, Lokhttp3/internal/http2/Http2Connection$5;-><init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILokio/b;IZ)V
invoke-direct {p0, p2}, Lokhttp3/internal/http2/Http2Connection;->pushExecutorExecute(Lokhttp3/internal/NamedRunnable;)V
return-void
.line 6
:cond_31
new-instance p1, Ljava/io/IOException;
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
.line 7
iget-wide v0, v5, Lokio/b;->b:J
.line 8
invoke-virtual {p2, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string p4, " != "
invoke-virtual {p2, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public pushHeadersLater(ILjava/util/List;Z)V
.registers 12
.annotation system Ldalvik/annotation/Signature;
value = {
"(I",
"Ljava/util/List<",
"Lokhttp3/internal/http2/Header;",
">;Z)V"
}
.end annotation
:try_start_0
new-instance v7, Lokhttp3/internal/http2/Http2Connection$4;
const-string v2, "OkHttp %s Push Headers[%s]"
const/4 v0, 0x2
new-array v3, v0, [Ljava/lang/Object;
const/4 v0, 0x0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection;->hostname:Ljava/lang/String;
aput-object v1, v3, v0
const/4 v0, 0x1
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v3, v0
move-object v0, v7
move-object v1, p0
move v4, p1
move-object v5, p2
move v6, p3
invoke-direct/range {v0 .. v6}, Lokhttp3/internal/http2/Http2Connection$4;-><init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILjava/util/List;Z)V
invoke-direct {p0, v7}, Lokhttp3/internal/http2/Http2Connection;->pushExecutorExecute(Lokhttp3/internal/NamedRunnable;)V
:try_end_1e
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_1e} :catch_1e
:catch_1e
return-void
.end method
.method public pushRequestLater(ILjava/util/List;)V
.registers 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(I",
"Ljava/util/List<",
"Lokhttp3/internal/http2/Header;",
">;)V"
}
.end annotation
.line 1
monitor-enter p0
.line 2
:try_start_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->currentPushRequests:Ljava/util/Set;
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
invoke-interface {v0, v1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_14
.line 3
sget-object p2, Lokhttp3/internal/http2/ErrorCode;->PROTOCOL_ERROR:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {p0, p1, p2}, Lokhttp3/internal/http2/Http2Connection;->writeSynResetLater(ILokhttp3/internal/http2/ErrorCode;)V
.line 4
monitor-exit p0
return-void
.line 5
:cond_14
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->currentPushRequests:Ljava/util/Set;
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
.line 6
monitor-exit p0
:try_end_1e
.catchall {:try_start_1 .. :try_end_1e} :catchall_3c
.line 7
:try_start_1e
new-instance v0, Lokhttp3/internal/http2/Http2Connection$3;
const-string v4, "OkHttp %s Push Request[%s]"
const/4 v1, 0x2
new-array v5, v1, [Ljava/lang/Object;
const/4 v1, 0x0
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection;->hostname:Ljava/lang/String;
aput-object v2, v5, v1
const/4 v1, 0x1
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v5, v1
move-object v2, v0
move-object v3, p0
move v6, p1
move-object v7, p2
invoke-direct/range {v2 .. v7}, Lokhttp3/internal/http2/Http2Connection$3;-><init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILjava/util/List;)V
invoke-direct {p0, v0}, Lokhttp3/internal/http2/Http2Connection;->pushExecutorExecute(Lokhttp3/internal/NamedRunnable;)V
:try_end_3b
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_1e .. :try_end_3b} :catch_3b
:catch_3b
return-void
:catchall_3c
move-exception p1
.line 8
:try_start_3d
monitor-exit p0
:try_end_3e
.catchall {:try_start_3d .. :try_end_3e} :catchall_3c
throw p1
.end method
.method public pushResetLater(ILokhttp3/internal/http2/ErrorCode;)V
.registers 10
new-instance v6, Lokhttp3/internal/http2/Http2Connection$6;
const/4 v0, 0x2
new-array v3, v0, [Ljava/lang/Object;
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->hostname:Ljava/lang/String;
const/4 v1, 0x0
aput-object v0, v3, v1
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
const/4 v1, 0x1
aput-object v0, v3, v1
const-string v2, "OkHttp %s Push Reset[%s]"
move-object v0, v6
move-object v1, p0
move v4, p1
move-object v5, p2
invoke-direct/range {v0 .. v5}, Lokhttp3/internal/http2/Http2Connection$6;-><init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILokhttp3/internal/http2/ErrorCode;)V
invoke-direct {p0, v6}, Lokhttp3/internal/http2/Http2Connection;->pushExecutorExecute(Lokhttp3/internal/NamedRunnable;)V
return-void
.end method
.method public pushStream(ILjava/util/List;Z)Lokhttp3/internal/http2/Http2Stream;
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(I",
"Ljava/util/List<",
"Lokhttp3/internal/http2/Header;",
">;Z)",
"Lokhttp3/internal/http2/Http2Stream;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Connection;->client:Z
if-nez v0, :cond_9
.line 2
invoke-direct {p0, p1, p2, p3}, Lokhttp3/internal/http2/Http2Connection;->newStream(ILjava/util/List;Z)Lokhttp3/internal/http2/Http2Stream;
move-result-object p1
return-object p1
.line 3
:cond_9
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "Client cannot push requests."
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public pushedStream(I)Z
.registers 3
const/4 v0, 0x1
if-eqz p1, :cond_7
and-int/2addr p1, v0
if-nez p1, :cond_7
goto :goto_8
:cond_7
const/4 v0, 0x0
:goto_8
return v0
.end method
.method public declared-synchronized removeStream(I)Lokhttp3/internal/http2/Http2Stream;
.registers 3
monitor-enter p0
.line 1
:try_start_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Lokhttp3/internal/http2/Http2Stream;
.line 2
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
:try_end_10
.catchall {:try_start_1 .. :try_end_10} :catchall_12
.line 3
monitor-exit p0
return-object p1
:catchall_12
move-exception p1
monitor-exit p0
throw p1
.end method
.method public setSettings(Lokhttp3/internal/http2/Settings;)V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
monitor-enter v0
.line 2
:try_start_3
monitor-enter p0
:try_end_4
.catchall {:try_start_3 .. :try_end_4} :catchall_1e
.line 3
:try_start_4
iget-boolean v1, p0, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
if-nez v1, :cond_15
.line 4
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
invoke-virtual {v1, p1}, Lokhttp3/internal/http2/Settings;->merge(Lokhttp3/internal/http2/Settings;)V
.line 5
monitor-exit p0
:try_end_e
.catchall {:try_start_4 .. :try_end_e} :catchall_1b
.line 6
:try_start_e
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
invoke-virtual {v1, p1}, Lokhttp3/internal/http2/Http2Writer;->settings(Lokhttp3/internal/http2/Settings;)V
.line 7
monitor-exit v0
:try_end_14
.catchall {:try_start_e .. :try_end_14} :catchall_1e
return-void
.line 8
:cond_15
:try_start_15
new-instance p1, Lokhttp3/internal/http2/ConnectionShutdownException;
invoke-direct {p1}, Lokhttp3/internal/http2/ConnectionShutdownException;-><init>()V
throw p1
:catchall_1b
move-exception p1
.line 9
monitor-exit p0
:try_end_1d
.catchall {:try_start_15 .. :try_end_1d} :catchall_1b
:try_start_1d
throw p1
:catchall_1e
move-exception p1
.line 10
monitor-exit v0
:try_end_20
.catchall {:try_start_1d .. :try_end_20} :catchall_1e
throw p1
.end method
.method public shutdown(Lokhttp3/internal/http2/ErrorCode;)V
.registers 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
monitor-enter v0
.line 2
:try_start_3
monitor-enter p0
:try_end_4
.catchall {:try_start_3 .. :try_end_4} :catchall_1d
.line 3
:try_start_4
iget-boolean v1, p0, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
if-eqz v1, :cond_b
.line 4
monitor-exit p0
:try_end_9
.catchall {:try_start_4 .. :try_end_9} :catchall_1a
:try_start_9
monitor-exit v0
:try_end_a
.catchall {:try_start_9 .. :try_end_a} :catchall_1d
return-void
:cond_b
const/4 v1, 0x1
.line 5
:try_start_c
iput-boolean v1, p0, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
.line 6
iget v1, p0, Lokhttp3/internal/http2/Http2Connection;->lastGoodStreamId:I
.line 7
monitor-exit p0
:try_end_11
.catchall {:try_start_c .. :try_end_11} :catchall_1a
.line 8
:try_start_11
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
sget-object v3, Lokhttp3/internal/Util;->EMPTY_BYTE_ARRAY:[B
invoke-virtual {v2, v1, p1, v3}, Lokhttp3/internal/http2/Http2Writer;->goAway(ILokhttp3/internal/http2/ErrorCode;[B)V
.line 9
monitor-exit v0
:try_end_19
.catchall {:try_start_11 .. :try_end_19} :catchall_1d
return-void
:catchall_1a
move-exception p1
.line 10
:try_start_1b
monitor-exit p0
:try_end_1c
.catchall {:try_start_1b .. :try_end_1c} :catchall_1a
:try_start_1c
throw p1
:catchall_1d
move-exception p1
.line 11
monitor-exit v0
:try_end_1f
.catchall {:try_start_1c .. :try_end_1f} :catchall_1d
throw p1
.end method
.method public start()V
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x1
.line 1
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Http2Connection;->start(Z)V
return-void
.end method
.method public start(Z)V
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
if-eqz p1, :cond_21
.line 2
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Writer;->connectionPreface()V
.line 3
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Http2Writer;->settings(Lokhttp3/internal/http2/Settings;)V
.line 4
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
invoke-virtual {p1}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
move-result p1
const v0, 0xffff
if-eq p1, v0, :cond_21
.line 5
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
const/4 v2, 0x0
sub-int/2addr p1, v0
int-to-long v3, p1
invoke-virtual {v1, v2, v3, v4}, Lokhttp3/internal/http2/Http2Writer;->windowUpdate(IJ)V
.line 6
:cond_21
sget-object p1, Lokhttp3/internal/http2/Http2Connection;->readExecutor:Ljava/util/concurrent/ExecutorService;
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->readerRunnable:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
invoke-static {p1, v0}, Lokhttp3/internal/http2/Http2Connection;->INVOKEINTERFACE_okhttp3_internal_http2_Http2Connection_com_shopee_app_asm_anr_threadpool_ExecutorProxy_execute(Ljava/util/concurrent/ExecutorService;Ljava/lang/Runnable;)V
return-void
.end method
.method public declared-synchronized updateConnectionFlowControl(J)V
.registers 6
monitor-enter p0
.line 1
:try_start_1
iget-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->unacknowledgedBytesRead:J
add-long/2addr v0, p1
iput-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->unacknowledgedBytesRead:J
.line 2
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
invoke-virtual {p1}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
move-result p1
div-int/lit8 p1, p1, 0x2
int-to-long p1, p1
cmp-long v2, v0, p1
if-ltz v2, :cond_1d
const/4 p1, 0x0
.line 3
iget-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->unacknowledgedBytesRead:J
invoke-virtual {p0, p1, v0, v1}, Lokhttp3/internal/http2/Http2Connection;->writeWindowUpdateLater(IJ)V
const-wide/16 p1, 0x0
.line 4
iput-wide p1, p0, Lokhttp3/internal/http2/Http2Connection;->unacknowledgedBytesRead:J
:try_end_1d
.catchall {:try_start_1 .. :try_end_1d} :catchall_1f
.line 5
:cond_1d
monitor-exit p0
return-void
:catchall_1f
move-exception p1
monitor-exit p0
throw p1
.end method
.method public writeData(IZLokio/b;J)V
.registers 14
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x0
const-wide/16 v1, 0x0
cmp-long v3, p4, v1
if-nez v3, :cond_d
.line 1
iget-object p4, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
invoke-virtual {p4, p2, p1, p3, v0}, Lokhttp3/internal/http2/Http2Writer;->data(ZILokio/b;I)V
return-void
:cond_d
:goto_d
cmp-long v3, p4, v1
if-lez v3, :cond_67
.line 2
monitor-enter p0
.line 3
:goto_12
:try_start_12
iget-wide v3, p0, Lokhttp3/internal/http2/Http2Connection;->bytesLeftInWriteWindow:J
cmp-long v5, v3, v1
if-gtz v5, :cond_30
.line 4
iget-object v3, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-interface {v3, v4}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_28
.line 5
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
goto :goto_12
.line 6
:cond_28
new-instance p1, Ljava/io/IOException;
const-string p2, "stream closed"
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw p1
:try_end_30
.catch Ljava/lang/InterruptedException; {:try_start_12 .. :try_end_30} :catch_58
.catchall {:try_start_12 .. :try_end_30} :catchall_56
.line 7
:cond_30
:try_start_30
invoke-static {p4, p5, v3, v4}, Ljava/lang/Math;->min(JJ)J
move-result-wide v3
long-to-int v4, v3
.line 8
iget-object v3, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
invoke-virtual {v3}, Lokhttp3/internal/http2/Http2Writer;->maxDataLength()I
move-result v3
invoke-static {v4, v3}, Ljava/lang/Math;->min(II)I
move-result v3
.line 9
iget-wide v4, p0, Lokhttp3/internal/http2/Http2Connection;->bytesLeftInWriteWindow:J
int-to-long v6, v3
sub-long/2addr v4, v6
iput-wide v4, p0, Lokhttp3/internal/http2/Http2Connection;->bytesLeftInWriteWindow:J
.line 10
monitor-exit p0
:try_end_46
.catchall {:try_start_30 .. :try_end_46} :catchall_56
sub-long/2addr p4, v6
.line 11
iget-object v4, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
if-eqz p2, :cond_51
cmp-long v5, p4, v1
if-nez v5, :cond_51
const/4 v5, 0x1
goto :goto_52
:cond_51
const/4 v5, 0x0
:goto_52
invoke-virtual {v4, v5, p1, p3, v3}, Lokhttp3/internal/http2/Http2Writer;->data(ZILokio/b;I)V
goto :goto_d
:catchall_56
move-exception p1
goto :goto_65
.line 12
:catch_58
:try_start_58
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Thread;->interrupt()V
.line 13
new-instance p1, Ljava/io/InterruptedIOException;
invoke-direct {p1}, Ljava/io/InterruptedIOException;-><init>()V
throw p1
.line 14
:goto_65
monitor-exit p0
:try_end_66
.catchall {:try_start_58 .. :try_end_66} :catchall_56
throw p1
:cond_67
return-void
.end method
.method public writePing(ZII)V
.registers 6
if-nez p1, :cond_12
.line 1
monitor-enter p0
.line 2
:try_start_3
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Connection;->awaitingPong:Z
const/4 v1, 0x1
.line 3
iput-boolean v1, p0, Lokhttp3/internal/http2/Http2Connection;->awaitingPong:Z
.line 4
monitor-exit p0
:try_end_9
.catchall {:try_start_3 .. :try_end_9} :catchall_f
if-eqz v0, :cond_12
.line 5
invoke-direct {p0}, Lokhttp3/internal/http2/Http2Connection;->failConnection()V
return-void
:catchall_f
move-exception p1
.line 6
:try_start_10
monitor-exit p0
:try_end_11
.catchall {:try_start_10 .. :try_end_11} :catchall_f
throw p1
.line 7
:cond_12
:try_start_12
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
invoke-virtual {v0, p1, p2, p3}, Lokhttp3/internal/http2/Http2Writer;->ping(ZII)V
:try_end_17
.catch Ljava/io/IOException; {:try_start_12 .. :try_end_17} :catch_18
goto :goto_1b
.line 8
:catch_18
invoke-direct {p0}, Lokhttp3/internal/http2/Http2Connection;->failConnection()V
:goto_1b
return-void
.end method
.method public writePingAndAwaitPong()V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/InterruptedException;
}
.end annotation
const/4 v0, 0x0
const v1, 0x4f4b6f6b
const v2, -0xf607257
.line 1
invoke-virtual {p0, v0, v1, v2}, Lokhttp3/internal/http2/Http2Connection;->writePing(ZII)V
.line 2
invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Connection;->awaitPong()V
return-void
.end method
.method public writeSynReply(IZLjava/util/List;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(IZ",
"Ljava/util/List<",
"Lokhttp3/internal/http2/Header;",
">;)V"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
invoke-virtual {v0, p2, p1, p3}, Lokhttp3/internal/http2/Http2Writer;->synReply(ZILjava/util/List;)V
return-void
.end method
.method public writeSynReset(ILokhttp3/internal/http2/ErrorCode;)V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
invoke-virtual {v0, p1, p2}, Lokhttp3/internal/http2/Http2Writer;->rstStream(ILokhttp3/internal/http2/ErrorCode;)V
return-void
.end method
.method public writeSynResetLater(ILokhttp3/internal/http2/ErrorCode;)V
.registers 11
:try_start_0
sget-object v0, Lokhttp3/internal/http2/Http2Connection;->writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
new-instance v7, Lokhttp3/internal/http2/Http2Connection$1;
const-string v3, "OkHttp %s stream %d"
const/4 v1, 0x2
new-array v4, v1, [Ljava/lang/Object;
const/4 v1, 0x0
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection;->hostname:Ljava/lang/String;
aput-object v2, v4, v1
const/4 v1, 0x1
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v4, v1
move-object v1, v7
move-object v2, p0
move v5, p1
move-object v6, p2
invoke-direct/range {v1 .. v6}, Lokhttp3/internal/http2/Http2Connection$1;-><init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILokhttp3/internal/http2/ErrorCode;)V
invoke-static {v0, v7}, Lokhttp3/internal/http2/Http2Connection;->INVOKEINTERFACE_okhttp3_internal_http2_Http2Connection_com_shopee_app_asm_anr_threadpool_ExecutorProxy_execute(Ljava/util/concurrent/ScheduledExecutorService;Ljava/lang/Runnable;)V
:try_end_1f
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_1f} :catch_1f
:catch_1f
return-void
.end method
.method public writeWindowUpdateLater(IJ)V
.registers 13
.line 1
:try_start_0
sget-object v0, Lokhttp3/internal/http2/Http2Connection;->writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
new-instance v8, Lokhttp3/internal/http2/Http2Connection$2;
const-string v3, "OkHttp Window Update %s stream %d"
const/4 v1, 0x2
new-array v4, v1, [Ljava/lang/Object;
const/4 v1, 0x0
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection;->hostname:Ljava/lang/String;
aput-object v2, v4, v1
const/4 v1, 0x1
.line 2
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v4, v1
move-object v1, v8
move-object v2, p0
move v5, p1
move-wide v6, p2
invoke-direct/range {v1 .. v7}, Lokhttp3/internal/http2/Http2Connection$2;-><init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;IJ)V
.line 3
invoke-static {v0, v8}, Lokhttp3/internal/http2/Http2Connection;->INVOKEINTERFACE_okhttp3_internal_http2_Http2Connection_com_shopee_app_asm_anr_threadpool_ExecutorProxy_execute(Ljava/util/concurrent/ScheduledExecutorService;Ljava/lang/Runnable;)V
:try_end_1f
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_1f} :catch_1f
:catch_1f
return-void
.end method