Files
rr3-apk/smali_classes5/okhttp3/internal/http2/Http2Connection.smali
Daniel Elliott f3960ee359 Add Discord APKTool decompilation (Smali source for modding)
- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3
- APKTool decompilation (Smali bytecode) for modding and rebuilding APK
- Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures
- Includes full Smali source, resources, and native libraries
- Ready to rebuild APK after modifications with apktool b command
- Added comprehensive README-apktool.md with modding guide

This branch complements the JADX branches:
- Use JADX (main/discord-community) to UNDERSTAND code (readable Java)
- Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali)

Total: 44,417 files, 538.51 MB Smali source code
2026-02-18 16:13:44 -08:00

1939 lines
48 KiB
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$Listener;,
Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;,
Lokhttp3/internal/http2/Http2Connection$Builder;,
Lokhttp3/internal/http2/Http2Connection$IntervalPingRunnable;,
Lokhttp3/internal/http2/Http2Connection$PingRunnable;
}
.end annotation
# static fields
.field public static final listenerExecutor:Ljava/util/concurrent/ExecutorService;
# instance fields
.field public awaitPingsSent:J
.field public awaitPongsReceived:J
.field public bytesLeftInWriteWindow:J
.field public final client:Z
.field public final connectionName:Ljava/lang/String;
.field public final currentPushRequests:Ljava/util/Set;
.field public degradedPingsSent:J
.field public degradedPongDeadlineNs:J
.field public degradedPongsReceived:J
.field public intervalPingsSent:J
.field public intervalPongsReceived:J
.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 pushExecutor:Ljava/util/concurrent/ExecutorService;
.field public final pushObserver:Lokhttp3/internal/http2/PushObserver;
.field public final readerRunnable:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
.field public shutdown:Z
.field public final socket:Ljava/net/Socket;
.field public final streams:Ljava/util/Map;
.field public unacknowledgedBytesRead:J
.field public final writer:Lokhttp3/internal/http2/Http2Writer;
.field public final writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
# direct methods
.method static constructor <clinit>()V
.locals 9
.line 87
new-instance v8, Ljava/util/concurrent/ThreadPoolExecutor;
const/4 v1, 0x0
const v2, 0x7fffffff
const-wide/16 v3, 0x3c
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-string v0, "OkHttp Http2Connection"
const/4 v7, 0x1
.line 89
invoke-static {v0, v7}, Lokhttp3/internal/Util;->threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
move-result-object v7
move-object v0, v8
invoke-direct/range {v0 .. v7}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V
sput-object v8, Lokhttp3/internal/http2/Http2Connection;->listenerExecutor:Ljava/util/concurrent/ExecutorService;
return-void
.end method
.method public constructor <init>(Lokhttp3/internal/http2/Http2Connection$Builder;)V
.locals 23
move-object/from16 v0, p0
move-object/from16 v1, p1
.line 151
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
.line 99
new-instance v2, Ljava/util/LinkedHashMap;
invoke-direct {v2}, Ljava/util/LinkedHashMap;-><init>()V
iput-object v2, v0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
const-wide/16 v2, 0x0
iput-wide v2, v0, Lokhttp3/internal/http2/Http2Connection;->intervalPingsSent:J
iput-wide v2, v0, Lokhttp3/internal/http2/Http2Connection;->intervalPongsReceived:J
iput-wide v2, v0, Lokhttp3/internal/http2/Http2Connection;->degradedPingsSent:J
iput-wide v2, v0, Lokhttp3/internal/http2/Http2Connection;->degradedPongsReceived:J
iput-wide v2, v0, Lokhttp3/internal/http2/Http2Connection;->awaitPingsSent:J
iput-wide v2, v0, Lokhttp3/internal/http2/Http2Connection;->awaitPongsReceived:J
iput-wide v2, v0, Lokhttp3/internal/http2/Http2Connection;->degradedPongDeadlineNs:J
iput-wide v2, v0, Lokhttp3/internal/http2/Http2Connection;->unacknowledgedBytesRead:J
.line 139
new-instance v2, Lokhttp3/internal/http2/Settings;
invoke-direct {v2}, Lokhttp3/internal/http2/Settings;-><init>()V
iput-object v2, v0, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
.line 143
new-instance v2, Lokhttp3/internal/http2/Settings;
invoke-direct {v2}, Lokhttp3/internal/http2/Settings;-><init>()V
iput-object v2, v0, Lokhttp3/internal/http2/Http2Connection;->peerSettings:Lokhttp3/internal/http2/Settings;
.line 893
new-instance v3, Ljava/util/LinkedHashSet;
invoke-direct {v3}, Ljava/util/LinkedHashSet;-><init>()V
iput-object v3, v0, Lokhttp3/internal/http2/Http2Connection;->currentPushRequests:Ljava/util/Set;
.line 152
iget-object v3, v1, Lokhttp3/internal/http2/Http2Connection$Builder;->pushObserver:Lokhttp3/internal/http2/PushObserver;
iput-object v3, v0, Lokhttp3/internal/http2/Http2Connection;->pushObserver:Lokhttp3/internal/http2/PushObserver;
.line 153
iget-boolean v3, v1, Lokhttp3/internal/http2/Http2Connection$Builder;->client:Z
iput-boolean v3, v0, Lokhttp3/internal/http2/Http2Connection;->client:Z
.line 154
iget-object v4, v1, Lokhttp3/internal/http2/Http2Connection$Builder;->listener:Lokhttp3/internal/http2/Http2Connection$Listener;
iput-object v4, v0, Lokhttp3/internal/http2/Http2Connection;->listener:Lokhttp3/internal/http2/Http2Connection$Listener;
const/4 v4, 0x2
const/4 v5, 0x1
if-eqz v3, :cond_0
move v6, v5
goto :goto_0
:cond_0
move v6, v4
:goto_0
iput v6, v0, Lokhttp3/internal/http2/Http2Connection;->nextStreamId:I
if-eqz v3, :cond_1
add-int/2addr v6, v4
iput v6, v0, Lokhttp3/internal/http2/Http2Connection;->nextStreamId:I
:cond_1
const/4 v4, 0x7
if-eqz v3, :cond_2
iget-object v6, v0, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
const/high16 v7, 0x1000000
.line 166
invoke-virtual {v6, v4, v7}, Lokhttp3/internal/http2/Settings;->set(II)Lokhttp3/internal/http2/Settings;
.line 169
:cond_2
iget-object v6, v1, Lokhttp3/internal/http2/Http2Connection$Builder;->connectionName:Ljava/lang/String;
iput-object v6, v0, Lokhttp3/internal/http2/Http2Connection;->connectionName:Ljava/lang/String;
.line 171
new-instance v7, Ljava/util/concurrent/ScheduledThreadPoolExecutor;
const-string v8, "OkHttp %s Writer"
filled-new-array {v6}, [Ljava/lang/Object;
move-result-object v9
.line 172
invoke-static {v8, v9}, Lokhttp3/internal/Util;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v8
const/4 v9, 0x0
invoke-static {v8, v9}, Lokhttp3/internal/Util;->threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
move-result-object v8
invoke-direct {v7, v5, v8}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;-><init>(ILjava/util/concurrent/ThreadFactory;)V
iput-object v7, v0, Lokhttp3/internal/http2/Http2Connection;->writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
.line 173
iget v8, v1, Lokhttp3/internal/http2/Http2Connection$Builder;->pingIntervalMillis:I
if-eqz v8, :cond_3
.line 174
new-instance v8, Lokhttp3/internal/http2/Http2Connection$IntervalPingRunnable;
invoke-direct {v8, v0}, Lokhttp3/internal/http2/Http2Connection$IntervalPingRunnable;-><init>(Lokhttp3/internal/http2/Http2Connection;)V
iget v9, v1, Lokhttp3/internal/http2/Http2Connection$Builder;->pingIntervalMillis:I
int-to-long v10, v9
int-to-long v12, v9
sget-object v14, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
move-wide v9, v10
move-wide v11, v12
move-object v13, v14
invoke-interface/range {v7 .. v13}, Ljava/util/concurrent/ScheduledExecutorService;->scheduleAtFixedRate(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
.line 179
:cond_3
new-instance v7, Ljava/util/concurrent/ThreadPoolExecutor;
const/16 v16, 0x0
const/16 v17, 0x1
const-wide/16 v18, 0x3c
sget-object v20, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
new-instance v21, Ljava/util/concurrent/LinkedBlockingQueue;
invoke-direct/range {v21 .. v21}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V
const-string v8, "OkHttp %s Push Observer"
filled-new-array {v6}, [Ljava/lang/Object;
move-result-object v6
.line 180
invoke-static {v8, v6}, Lokhttp3/internal/Util;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v6
invoke-static {v6, v5}, Lokhttp3/internal/Util;->threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
move-result-object v22
move-object v15, v7
invoke-direct/range {v15 .. v22}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V
iput-object v7, v0, Lokhttp3/internal/http2/Http2Connection;->pushExecutor:Ljava/util/concurrent/ExecutorService;
const v5, 0xffff
.line 181
invoke-virtual {v2, v4, v5}, Lokhttp3/internal/http2/Settings;->set(II)Lokhttp3/internal/http2/Settings;
const/4 v4, 0x5
const/16 v5, 0x4000
.line 182
invoke-virtual {v2, v4, v5}, Lokhttp3/internal/http2/Settings;->set(II)Lokhttp3/internal/http2/Settings;
.line 183
invoke-virtual {v2}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
move-result v2
int-to-long v4, v2
iput-wide v4, v0, Lokhttp3/internal/http2/Http2Connection;->bytesLeftInWriteWindow:J
.line 184
iget-object v2, v1, Lokhttp3/internal/http2/Http2Connection$Builder;->socket:Ljava/net/Socket;
iput-object v2, v0, Lokhttp3/internal/http2/Http2Connection;->socket:Ljava/net/Socket;
.line 185
new-instance v2, Lokhttp3/internal/http2/Http2Writer;
iget-object v4, v1, Lokhttp3/internal/http2/Http2Connection$Builder;->sink:Lokio/BufferedSink;
invoke-direct {v2, v4, v3}, Lokhttp3/internal/http2/Http2Writer;-><init>(Lokio/BufferedSink;Z)V
iput-object v2, v0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 187
new-instance v2, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
new-instance v4, Lokhttp3/internal/http2/Http2Reader;
iget-object v1, v1, Lokhttp3/internal/http2/Http2Connection$Builder;->source:Lokio/BufferedSource;
invoke-direct {v4, v1, v3}, Lokhttp3/internal/http2/Http2Reader;-><init>(Lokio/BufferedSource;Z)V
invoke-direct {v2, v0, v4}, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;-><init>(Lokhttp3/internal/http2/Http2Connection;Lokhttp3/internal/http2/Http2Reader;)V
iput-object v2, v0, Lokhttp3/internal/http2/Http2Connection;->readerRunnable:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
return-void
.end method
.method public static synthetic access$000(Lokhttp3/internal/http2/Http2Connection;Ljava/io/IOException;)V
.locals 0
.line 62
invoke-virtual {p0, p1}, Lokhttp3/internal/http2/Http2Connection;->failConnection(Ljava/io/IOException;)V
return-void
.end method
.method public static synthetic access$100(Lokhttp3/internal/http2/Http2Connection;)J
.locals 2
.line 62
iget-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->intervalPongsReceived:J
return-wide v0
.end method
.method public static synthetic access$108(Lokhttp3/internal/http2/Http2Connection;)J
.locals 4
.line 62
iget-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->intervalPongsReceived:J
const-wide/16 v2, 0x1
add-long/2addr v2, v0
iput-wide v2, p0, Lokhttp3/internal/http2/Http2Connection;->intervalPongsReceived:J
return-wide v0
.end method
.method public static synthetic access$200(Lokhttp3/internal/http2/Http2Connection;)J
.locals 2
.line 62
iget-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->intervalPingsSent:J
return-wide v0
.end method
.method public static synthetic access$208(Lokhttp3/internal/http2/Http2Connection;)J
.locals 4
.line 62
iget-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->intervalPingsSent:J
const-wide/16 v2, 0x1
add-long/2addr v2, v0
iput-wide v2, p0, Lokhttp3/internal/http2/Http2Connection;->intervalPingsSent:J
return-wide v0
.end method
.method public static synthetic access$300(Lokhttp3/internal/http2/Http2Connection;)Z
.locals 0
.line 62
iget-boolean p0, p0, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
return p0
.end method
.method public static synthetic access$302(Lokhttp3/internal/http2/Http2Connection;Z)Z
.locals 0
.line 62
iput-boolean p1, p0, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
return p1
.end method
.method public static synthetic access$400()Ljava/util/concurrent/ExecutorService;
.locals 1
sget-object v0, Lokhttp3/internal/http2/Http2Connection;->listenerExecutor:Ljava/util/concurrent/ExecutorService;
return-object v0
.end method
.method public static synthetic access$500(Lokhttp3/internal/http2/Http2Connection;)Ljava/util/concurrent/ScheduledExecutorService;
.locals 0
.line 62
iget-object p0, p0, Lokhttp3/internal/http2/Http2Connection;->writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
return-object p0
.end method
.method public static synthetic access$608(Lokhttp3/internal/http2/Http2Connection;)J
.locals 4
.line 62
iget-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->degradedPongsReceived:J
const-wide/16 v2, 0x1
add-long/2addr v2, v0
iput-wide v2, p0, Lokhttp3/internal/http2/Http2Connection;->degradedPongsReceived:J
return-wide v0
.end method
.method public static synthetic access$708(Lokhttp3/internal/http2/Http2Connection;)J
.locals 4
.line 62
iget-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->awaitPongsReceived:J
const-wide/16 v2, 0x1
add-long/2addr v2, v0
iput-wide v2, p0, Lokhttp3/internal/http2/Http2Connection;->awaitPongsReceived:J
return-wide v0
.end method
# virtual methods
.method public close()V
.locals 3
.line 468
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;
const/4 v2, 0x0
invoke-virtual {p0, v0, v1, v2}, Lokhttp3/internal/http2/Http2Connection;->close(Lokhttp3/internal/http2/ErrorCode;Lokhttp3/internal/http2/ErrorCode;Ljava/io/IOException;)V
return-void
.end method
.method public close(Lokhttp3/internal/http2/ErrorCode;Lokhttp3/internal/http2/ErrorCode;Ljava/io/IOException;)V
.locals 3
.line 474
:try_start_0
invoke-virtual {p0, p1}, Lokhttp3/internal/http2/Http2Connection;->shutdown(Lokhttp3/internal/http2/ErrorCode;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.line 479
:catch_0
monitor-enter p0
:try_start_1
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
.line 480
invoke-interface {p1}, Ljava/util/Map;->isEmpty()Z
move-result p1
if-nez p1, :cond_0
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
.line 481
invoke-interface {p1}, Ljava/util/Map;->values()Ljava/util/Collection;
move-result-object p1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-interface {v0}, Ljava/util/Map;->size()I
move-result v0
new-array v0, v0, [Lokhttp3/internal/http2/Http2Stream;
invoke-interface {p1, v0}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p1
check-cast p1, [Lokhttp3/internal/http2/Http2Stream;
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
.line 482
invoke-interface {v0}, Ljava/util/Map;->clear()V
goto :goto_0
:catchall_0
move-exception p1
goto :goto_2
:cond_0
const/4 p1, 0x0
.line 484
:goto_0
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-eqz p1, :cond_1
.line 487
array-length v0, p1
const/4 v1, 0x0
:goto_1
if-ge v1, v0, :cond_1
aget-object v2, p1, v1
.line 489
:try_start_2
invoke-virtual {v2, p2, p3}, Lokhttp3/internal/http2/Http2Stream;->close(Lokhttp3/internal/http2/ErrorCode;Ljava/io/IOException;)V
:try_end_2
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_1
:catch_1
add-int/lit8 v1, v1, 0x1
goto :goto_1
:cond_1
:try_start_3
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 497
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Writer;->close()V
:try_end_3
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_2
:catch_2
:try_start_4
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->socket:Ljava/net/Socket;
.line 503
invoke-virtual {p1}, Ljava/net/Socket;->close()V
:try_end_4
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_3
:catch_3
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
.line 508
invoke-interface {p1}, Ljava/util/concurrent/ExecutorService;->shutdown()V
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->pushExecutor:Ljava/util/concurrent/ExecutorService;
.line 509
invoke-interface {p1}, Ljava/util/concurrent/ExecutorService;->shutdown()V
return-void
.line 484
:goto_2
:try_start_5
monitor-exit p0
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_0
throw p1
.end method
.method public final failConnection(Ljava/io/IOException;)V
.locals 1
.line 513
sget-object v0, Lokhttp3/internal/http2/ErrorCode;->PROTOCOL_ERROR:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {p0, v0, v0, p1}, Lokhttp3/internal/http2/Http2Connection;->close(Lokhttp3/internal/http2/ErrorCode;Lokhttp3/internal/http2/ErrorCode;Ljava/io/IOException;)V
return-void
.end method
.method public flush()V
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 439
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Writer;->flush()V
return-void
.end method
.method public declared-synchronized getStream(I)Lokhttp3/internal/http2/Http2Stream;
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
.line 198
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_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object p1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized isHealthy(J)Z
.locals 6
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v1, 0x0
if-eqz v0, :cond_0
.line 554
monitor-exit p0
return v1
:cond_0
:try_start_1
iget-wide v2, p0, Lokhttp3/internal/http2/Http2Connection;->degradedPongsReceived:J
iget-wide v4, p0, Lokhttp3/internal/http2/Http2Connection;->degradedPingsSent:J
cmp-long v0, v2, v4
if-gez v0, :cond_1
iget-wide v2, p0, Lokhttp3/internal/http2/Http2Connection;->degradedPongDeadlineNs:J
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
cmp-long p1, p1, v2
if-ltz p1, :cond_1
.line 557
monitor-exit p0
return v1
:catchall_0
move-exception p1
goto :goto_0
.line 559
:cond_1
monitor-exit p0
const/4 p1, 0x1
return p1
:goto_0
monitor-exit p0
throw p1
.end method
.method public declared-synchronized maxConcurrentStreams()I
.locals 2
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->peerSettings:Lokhttp3/internal/http2/Settings;
const v1, 0x7fffffff
.line 208
invoke-virtual {v0, v1}, Lokhttp3/internal/http2/Settings;->getMaxConcurrentStreams(I)I
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final newStream(ILjava/util/List;Z)Lokhttp3/internal/http2/Http2Stream;
.locals 10
xor-int/lit8 v6, p3, 0x1
const/4 v4, 0x0
iget-object v7, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 249
monitor-enter v7
.line 250
:try_start_0
monitor-enter p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
iget v0, p0, Lokhttp3/internal/http2/Http2Connection;->nextStreamId:I
const v1, 0x3fffffff # 1.9999999f
if-le v0, v1, :cond_0
.line 252
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
goto :goto_0
:catchall_0
move-exception p1
goto :goto_4
:cond_0
:goto_0
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
if-nez v0, :cond_7
iget v8, p0, Lokhttp3/internal/http2/Http2Connection;->nextStreamId:I
add-int/lit8 v0, v8, 0x2
iput v0, p0, Lokhttp3/internal/http2/Http2Connection;->nextStreamId:I
.line 259
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_2
iget-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->bytesLeftInWriteWindow:J
const-wide/16 v2, 0x0
cmp-long p3, v0, v2
if-eqz p3, :cond_2
iget-wide v0, v9, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
cmp-long p3, v0, v2
if-nez p3, :cond_1
goto :goto_1
:cond_1
const/4 p3, 0x0
goto :goto_2
:cond_2
:goto_1
const/4 p3, 0x1
.line 261
:goto_2
invoke-virtual {v9}, Lokhttp3/internal/http2/Http2Stream;->isOpen()Z
move-result v0
if-eqz v0, :cond_3
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
.line 262
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 264
:cond_3
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-nez p1, :cond_4
:try_start_2
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 266
invoke-virtual {p1, v6, v8, p2}, Lokhttp3/internal/http2/Http2Writer;->headers(ZILjava/util/List;)V
goto :goto_3
:catchall_1
move-exception p1
goto :goto_5
:cond_4
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Connection;->client:Z
if-nez v0, :cond_6
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 270
invoke-virtual {v0, p1, v8, p2}, Lokhttp3/internal/http2/Http2Writer;->pushPromise(IILjava/util/List;)V
.line 272
:goto_3
monitor-exit v7
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
if-eqz p3, :cond_5
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 275
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Writer;->flush()V
:cond_5
return-object v9
.line 268
:cond_6
:try_start_3
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_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
.line 255
:cond_7
:try_start_4
new-instance p1, Lokhttp3/internal/http2/ConnectionShutdownException;
invoke-direct {p1}, Lokhttp3/internal/http2/ConnectionShutdownException;-><init>()V
throw p1
.line 264
:goto_4
monitor-exit p0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
:try_start_5
throw p1
.line 272
:goto_5
monitor-exit v7
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_1
throw p1
.end method
.method public newStream(Ljava/util/List;Z)Lokhttp3/internal/http2/Http2Stream;
.locals 1
const/4 v0, 0x0
.line 238
invoke-virtual {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 pushDataLater(ILokio/BufferedSource;IZ)V
.locals 8
.line 953
new-instance v5, Lokio/Buffer;
invoke-direct {v5}, Lokio/Buffer;-><init>()V
int-to-long v0, p3
.line 954
invoke-interface {p2, v0, v1}, Lokio/BufferedSource;->require(J)V
.line 955
invoke-interface {p2, v5, v0, v1}, Lokio/Source;->read(Lokio/Buffer;J)J
.line 956
invoke-virtual {v5}, Lokio/Buffer;->size()J
move-result-wide v2
cmp-long p2, v2, v0
if-nez p2, :cond_0
.line 957
new-instance p2, Lokhttp3/internal/http2/Http2Connection$6;
const-string v2, "OkHttp %s Push Data[%s]"
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->connectionName:Ljava/lang/String;
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
filled-new-array {v0, v1}, [Ljava/lang/Object;
move-result-object v3
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$6;-><init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILokio/Buffer;IZ)V
invoke-virtual {p0, p2}, Lokhttp3/internal/http2/Http2Connection;->pushExecutorExecute(Lokhttp3/internal/NamedRunnable;)V
return-void
.line 956
:cond_0
new-instance p1, Ljava/io/IOException;
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v5}, Lokio/Buffer;->size()J
move-result-wide v0
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 final declared-synchronized pushExecutorExecute(Lokhttp3/internal/NamedRunnable;)V
.locals 1
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
if-nez v0, :cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->pushExecutor:Ljava/util/concurrent/ExecutorService;
.line 986
invoke-interface {v0, p1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception p1
goto :goto_1
.line 988
:cond_0
:goto_0
monitor-exit p0
return-void
:goto_1
monitor-exit p0
throw p1
.end method
.method public pushHeadersLater(ILjava/util/List;Z)V
.locals 8
.line 927
:try_start_0
new-instance v7, Lokhttp3/internal/http2/Http2Connection$5;
const-string v2, "OkHttp %s Push Headers[%s]"
const/4 v0, 0x2
new-array v3, v0, [Ljava/lang/Object;
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->connectionName:Ljava/lang/String;
const/4 v1, 0x0
aput-object v0, v3, v1
.line 928
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
const/4 v1, 0x1
aput-object v0, v3, v1
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$5;-><init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILjava/util/List;Z)V
.line 927
invoke-virtual {p0, v7}, Lokhttp3/internal/http2/Http2Connection;->pushExecutorExecute(Lokhttp3/internal/NamedRunnable;)V
:try_end_0
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
return-void
.end method
.method public pushRequestLater(ILjava/util/List;)V
.locals 8
.line 896
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->currentPushRequests:Ljava/util/Set;
.line 897
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_0
.line 898
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 899
monitor-exit p0
return-void
:catchall_0
move-exception p1
goto :goto_0
:cond_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->currentPushRequests:Ljava/util/Set;
.line 901
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 902
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 904
:try_start_1
new-instance v0, Lokhttp3/internal/http2/Http2Connection$4;
const-string v4, "OkHttp %s Push Request[%s]"
const/4 v1, 0x2
new-array v5, v1, [Ljava/lang/Object;
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection;->connectionName:Ljava/lang/String;
const/4 v2, 0x0
aput-object v1, v5, v2
.line 905
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
const/4 v2, 0x1
aput-object v1, v5, v2
move-object v2, v0
move-object v3, p0
move v6, p1
move-object v7, p2
invoke-direct/range {v2 .. v7}, Lokhttp3/internal/http2/Http2Connection$4;-><init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILjava/util/List;)V
.line 904
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Http2Connection;->pushExecutorExecute(Lokhttp3/internal/NamedRunnable;)V
:try_end_1
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_1 .. :try_end_1} :catch_0
:catch_0
return-void
.line 902
:goto_0
:try_start_2
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw p1
.end method
.method public pushResetLater(ILokhttp3/internal/http2/ErrorCode;)V
.locals 7
.line 974
new-instance v6, Lokhttp3/internal/http2/Http2Connection$7;
const-string v2, "OkHttp %s Push Reset[%s]"
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->connectionName:Ljava/lang/String;
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
filled-new-array {v0, v1}, [Ljava/lang/Object;
move-result-object v3
move-object v0, v6
move-object v1, p0
move v4, p1
move-object v5, p2
invoke-direct/range {v0 .. v5}, Lokhttp3/internal/http2/Http2Connection$7;-><init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;ILokhttp3/internal/http2/ErrorCode;)V
invoke-virtual {p0, v6}, Lokhttp3/internal/http2/Http2Connection;->pushExecutorExecute(Lokhttp3/internal/NamedRunnable;)V
return-void
.end method
.method public pushedStream(I)Z
.locals 1
if-eqz p1, :cond_0
const/4 v0, 0x1
and-int/2addr p1, v0
if-nez p1, :cond_0
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public declared-synchronized removeStream(I)Lokhttp3/internal/http2/Http2Stream;
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
.line 202
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 203
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 204
monitor-exit p0
return-object p1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public sendDegradedPingLater()V
.locals 6
.line 578
monitor-enter p0
:try_start_0
iget-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->degradedPongsReceived:J
iget-wide v2, p0, Lokhttp3/internal/http2/Http2Connection;->degradedPingsSent:J
cmp-long v0, v0, v2
if-gez v0, :cond_0
.line 579
monitor-exit p0
return-void
:catchall_0
move-exception v0
goto :goto_0
:cond_0
const-wide/16 v0, 0x1
add-long/2addr v2, v0
iput-wide v2, p0, Lokhttp3/internal/http2/Http2Connection;->degradedPingsSent:J
.line 581
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v0
const-wide/32 v2, 0x3b9aca00
add-long/2addr v0, v2
iput-wide v0, p0, Lokhttp3/internal/http2/Http2Connection;->degradedPongDeadlineNs:J
.line 582
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:try_start_1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
.line 584
new-instance v1, Lokhttp3/internal/http2/Http2Connection$3;
const-string v2, "OkHttp %s ping"
const/4 v3, 0x1
new-array v3, v3, [Ljava/lang/Object;
iget-object v4, p0, Lokhttp3/internal/http2/Http2Connection;->connectionName:Ljava/lang/String;
const/4 v5, 0x0
aput-object v4, v3, v5
invoke-direct {v1, p0, v2, v3}, Lokhttp3/internal/http2/Http2Connection$3;-><init>(Lokhttp3/internal/http2/Http2Connection;Ljava/lang/String;[Ljava/lang/Object;)V
invoke-interface {v0, v1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_1
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_1 .. :try_end_1} :catch_0
:catch_0
return-void
.line 582
:goto_0
:try_start_2
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw v0
.end method
.method public shutdown(Lokhttp3/internal/http2/ErrorCode;)V
.locals 4
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 448
monitor-enter v0
.line 450
:try_start_0
monitor-enter p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:try_start_1
iget-boolean v1, p0, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
if-eqz v1, :cond_0
.line 452
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:try_start_2
monitor-exit v0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
return-void
:catchall_0
move-exception p1
goto :goto_1
:catchall_1
move-exception p1
goto :goto_0
:cond_0
const/4 v1, 0x1
:try_start_3
iput-boolean v1, p0, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
iget v1, p0, Lokhttp3/internal/http2/Http2Connection;->lastGoodStreamId:I
.line 456
monitor-exit p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
:try_start_4
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 459
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 460
monitor-exit v0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
return-void
.line 456
:goto_0
:try_start_5
monitor-exit p0
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_1
:try_start_6
throw p1
.line 460
:goto_1
monitor-exit v0
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_0
throw p1
.end method
.method public start()V
.locals 1
const/4 v0, 0x1
.line 521
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Http2Connection;->start(Z)V
return-void
.end method
.method public start(Z)V
.locals 4
if-eqz p1, :cond_0
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 530
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Writer;->connectionPreface()V
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;
.line 531
invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Http2Writer;->settings(Lokhttp3/internal/http2/Settings;)V
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
.line 532
invoke-virtual {p1}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
move-result p1
const v0, 0xffff
if-eq p1, v0, :cond_0
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
sub-int/2addr p1, v0
int-to-long v2, p1
const/4 p1, 0x0
.line 534
invoke-virtual {v1, p1, v2, v3}, Lokhttp3/internal/http2/Http2Writer;->windowUpdate(IJ)V
.line 537
:cond_0
new-instance p1, Ljava/lang/Thread;
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->readerRunnable:Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
invoke-direct {p1, v0}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V
invoke-virtual {p1}, Ljava/lang/Thread;->start()V
return-void
.end method
.method public declared-synchronized updateConnectionFlowControl(J)V
.locals 2
monitor-enter p0
:try_start_0
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
iget-object p1, p0, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
.line 213
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 p1, v0, p1
if-ltz p1, :cond_0
iget-wide p1, p0, Lokhttp3/internal/http2/Http2Connection;->unacknowledgedBytesRead:J
const/4 v0, 0x0
.line 214
invoke-virtual {p0, v0, p1, p2}, Lokhttp3/internal/http2/Http2Connection;->writeWindowUpdateLater(IJ)V
const-wide/16 p1, 0x0
iput-wide p1, p0, Lokhttp3/internal/http2/Http2Connection;->unacknowledgedBytesRead:J
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception p1
goto :goto_1
.line 217
:cond_0
:goto_0
monitor-exit p0
return-void
:goto_1
monitor-exit p0
throw p1
.end method
.method public writeData(IZLokio/Buffer;J)V
.locals 8
const-wide/16 v0, 0x0
cmp-long v2, p4, v0
const/4 v3, 0x0
if-nez v2, :cond_0
iget-object p4, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 301
invoke-virtual {p4, p2, p1, p3, v3}, Lokhttp3/internal/http2/Http2Writer;->data(ZILokio/Buffer;I)V
return-void
:cond_0
:goto_0
cmp-long v2, p4, v0
if-lez v2, :cond_4
.line 307
monitor-enter p0
:goto_1
:try_start_0
iget-wide v4, p0, Lokhttp3/internal/http2/Http2Connection;->bytesLeftInWriteWindow:J
cmp-long v2, v4, v0
if-gtz v2, :cond_2
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
.line 312
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-interface {v2, v4}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_1
.line 315
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
goto :goto_1
:catchall_0
move-exception p1
goto :goto_3
.line 313
:cond_1
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_0
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 322
:cond_2
:try_start_1
invoke-static {p4, p5, v4, v5}, Ljava/lang/Math;->min(JJ)J
move-result-wide v4
long-to-int v2, v4
iget-object v4, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 323
invoke-virtual {v4}, Lokhttp3/internal/http2/Http2Writer;->maxDataLength()I
move-result v4
invoke-static {v2, v4}, Ljava/lang/Math;->min(II)I
move-result v2
iget-wide v4, p0, Lokhttp3/internal/http2/Http2Connection;->bytesLeftInWriteWindow:J
int-to-long v6, v2
sub-long/2addr v4, v6
iput-wide v4, p0, Lokhttp3/internal/http2/Http2Connection;->bytesLeftInWriteWindow:J
.line 325
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
sub-long/2addr p4, v6
iget-object v4, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
if-eqz p2, :cond_3
cmp-long v5, p4, v0
if-nez v5, :cond_3
const/4 v5, 0x1
goto :goto_2
:cond_3
move v5, v3
.line 328
:goto_2
invoke-virtual {v4, v5, p1, p3, v2}, Lokhttp3/internal/http2/Http2Writer;->data(ZILokio/Buffer;I)V
goto :goto_0
.line 318
:catch_0
:try_start_2
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Thread;->interrupt()V
.line 319
new-instance p1, Ljava/io/InterruptedIOException;
invoke-direct {p1}, Ljava/io/InterruptedIOException;-><init>()V
throw p1
.line 325
:goto_3
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw p1
:cond_4
return-void
.end method
.method public writeHeaders(IZLjava/util/List;)V
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 283
invoke-virtual {v0, p2, p1, p3}, Lokhttp3/internal/http2/Http2Writer;->headers(ZILjava/util/List;)V
return-void
.end method
.method public writePing(ZII)V
.locals 1
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 411
invoke-virtual {v0, p1, p2, p3}, Lokhttp3/internal/http2/Http2Writer;->ping(ZII)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p1
.line 413
invoke-virtual {p0, p1}, Lokhttp3/internal/http2/Http2Connection;->failConnection(Ljava/io/IOException;)V
:goto_0
return-void
.end method
.method public writeSynReset(ILokhttp3/internal/http2/ErrorCode;)V
.locals 1
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writer:Lokhttp3/internal/http2/Http2Writer;
.line 349
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
.locals 8
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
.line 334
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;
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection;->connectionName:Ljava/lang/String;
const/4 v2, 0x0
aput-object v1, v4, v2
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
const/4 v2, 0x1
aput-object v1, v4, v2
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-interface {v0, v7}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_0
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
return-void
.end method
.method public writeWindowUpdateLater(IJ)V
.locals 9
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection;->writerExecutor:Ljava/util/concurrent/ScheduledExecutorService;
.line 354
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;
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection;->connectionName:Ljava/lang/String;
const/4 v2, 0x0
aput-object v1, v4, v2
.line 355
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
const/4 v2, 0x1
aput-object v1, v4, v2
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 354
invoke-interface {v0, v8}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_0
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
return-void
.end method