2607 lines
69 KiB
Smali
2607 lines
69 KiB
Smali
.class public final Lokhttp3/internal/framed/FramedConnection;
|
|
.super Ljava/lang/Object;
|
|
.source "FramedConnection.java"
|
|
|
|
# interfaces
|
|
.implements Ljava/io/Closeable;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/internal/framed/FramedConnection$Listener;,
|
|
Lokhttp3/internal/framed/FramedConnection$Reader;,
|
|
Lokhttp3/internal/framed/FramedConnection$Builder;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field static final synthetic $assertionsDisabled:Z
|
|
|
|
.field private static final OKHTTP_CLIENT_WINDOW_SIZE:I = 0x1000000
|
|
|
|
.field private static final executor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
|
|
# instance fields
|
|
.field bytesLeftInWriteWindow:J
|
|
|
|
.field final client:Z
|
|
|
|
.field private final currentPushRequests:Ljava/util/Set;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Set",
|
|
"<",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
.field private final hostname:Ljava/lang/String;
|
|
|
|
.field private idleStartTimeNs:J
|
|
|
|
.field private lastGoodStreamId:I
|
|
|
|
.field private final listener:Lokhttp3/internal/framed/FramedConnection$Listener;
|
|
|
|
.field private nextPingId:I
|
|
|
|
.field private nextStreamId:I
|
|
|
|
.field okHttpSettings:Lokhttp3/internal/framed/Settings;
|
|
|
|
.field final peerSettings:Lokhttp3/internal/framed/Settings;
|
|
|
|
.field private pings:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Integer;",
|
|
"Lokhttp3/internal/framed/Ping;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final protocol:Lokhttp3/Protocol;
|
|
|
|
.field private final pushExecutor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
.field private final pushObserver:Lokhttp3/internal/framed/PushObserver;
|
|
|
|
.field final readerRunnable:Lokhttp3/internal/framed/FramedConnection$Reader;
|
|
|
|
.field private receivedInitialPeerSettings:Z
|
|
|
|
.field private shutdown:Z
|
|
|
|
.field final socket:Ljava/net/Socket;
|
|
|
|
.field private final streams:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map",
|
|
"<",
|
|
"Ljava/lang/Integer;",
|
|
"Lokhttp3/internal/framed/FramedStream;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field unacknowledgedBytesRead:J
|
|
|
|
.field final variant:Lokhttp3/internal/framed/Variant;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 9
|
|
|
|
.prologue
|
|
const/4 v8, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const-class v0, Lokhttp3/internal/framed/FramedConnection;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->desiredAssertionStatus()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
move v0, v8
|
|
|
|
:goto_0
|
|
sput-boolean v0, Lokhttp3/internal/framed/FramedConnection;->$assertionsDisabled:Z
|
|
|
|
new-instance v1, Ljava/util/concurrent/ThreadPoolExecutor;
|
|
|
|
const v3, 0x7fffffff
|
|
|
|
const-wide/16 v4, 0x3c
|
|
|
|
sget-object v6, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
new-instance v7, Ljava/util/concurrent/SynchronousQueue;
|
|
|
|
invoke-direct {v7}, Ljava/util/concurrent/SynchronousQueue;-><init>()V
|
|
|
|
const-string v0, "OkHttp FramedConnection"
|
|
|
|
invoke-static {v0, v8}, Lokhttp3/internal/Util;->threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-direct/range {v1 .. v8}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V
|
|
|
|
sput-object v1, Lokhttp3/internal/framed/FramedConnection;->executor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
move v0, v2
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private constructor <init>(Lokhttp3/internal/framed/FramedConnection$Builder;)V
|
|
.locals 12
|
|
.param p1, "builder" # Lokhttp3/internal/framed/FramedConnection$Builder;
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v10, 0x7
|
|
|
|
const/4 v1, 0x2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->streams:Ljava/util/Map;
|
|
|
|
invoke-static {}, Ljava/lang/System;->nanoTime()J
|
|
|
|
move-result-wide v4
|
|
|
|
iput-wide v4, p0, Lokhttp3/internal/framed/FramedConnection;->idleStartTimeNs:J
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
iput-wide v4, p0, Lokhttp3/internal/framed/FramedConnection;->unacknowledgedBytesRead:J
|
|
|
|
new-instance v0, Lokhttp3/internal/framed/Settings;
|
|
|
|
invoke-direct {v0}, Lokhttp3/internal/framed/Settings;-><init>()V
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->okHttpSettings:Lokhttp3/internal/framed/Settings;
|
|
|
|
new-instance v0, Lokhttp3/internal/framed/Settings;
|
|
|
|
invoke-direct {v0}, Lokhttp3/internal/framed/Settings;-><init>()V
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->peerSettings:Lokhttp3/internal/framed/Settings;
|
|
|
|
iput-boolean v2, p0, Lokhttp3/internal/framed/FramedConnection;->receivedInitialPeerSettings:Z
|
|
|
|
new-instance v0, Ljava/util/LinkedHashSet;
|
|
|
|
invoke-direct {v0}, Ljava/util/LinkedHashSet;-><init>()V
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->currentPushRequests:Ljava/util/Set;
|
|
|
|
invoke-static {p1}, Lokhttp3/internal/framed/FramedConnection$Builder;->access$000(Lokhttp3/internal/framed/FramedConnection$Builder;)Lokhttp3/Protocol;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
invoke-static {p1}, Lokhttp3/internal/framed/FramedConnection$Builder;->access$100(Lokhttp3/internal/framed/FramedConnection$Builder;)Lokhttp3/internal/framed/PushObserver;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->pushObserver:Lokhttp3/internal/framed/PushObserver;
|
|
|
|
invoke-static {p1}, Lokhttp3/internal/framed/FramedConnection$Builder;->access$200(Lokhttp3/internal/framed/FramedConnection$Builder;)Z
|
|
|
|
move-result v0
|
|
|
|
iput-boolean v0, p0, Lokhttp3/internal/framed/FramedConnection;->client:Z
|
|
|
|
invoke-static {p1}, Lokhttp3/internal/framed/FramedConnection$Builder;->access$300(Lokhttp3/internal/framed/FramedConnection$Builder;)Lokhttp3/internal/framed/FramedConnection$Listener;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->listener:Lokhttp3/internal/framed/FramedConnection$Listener;
|
|
|
|
invoke-static {p1}, Lokhttp3/internal/framed/FramedConnection$Builder;->access$200(Lokhttp3/internal/framed/FramedConnection$Builder;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
move v0, v3
|
|
|
|
:goto_0
|
|
iput v0, p0, Lokhttp3/internal/framed/FramedConnection;->nextStreamId:I
|
|
|
|
invoke-static {p1}, Lokhttp3/internal/framed/FramedConnection$Builder;->access$200(Lokhttp3/internal/framed/FramedConnection$Builder;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
sget-object v4, Lokhttp3/Protocol;->HTTP_2:Lokhttp3/Protocol;
|
|
|
|
if-ne v0, v4, :cond_0
|
|
|
|
iget v0, p0, Lokhttp3/internal/framed/FramedConnection;->nextStreamId:I
|
|
|
|
add-int/lit8 v0, v0, 0x2
|
|
|
|
iput v0, p0, Lokhttp3/internal/framed/FramedConnection;->nextStreamId:I
|
|
|
|
:cond_0
|
|
invoke-static {p1}, Lokhttp3/internal/framed/FramedConnection$Builder;->access$200(Lokhttp3/internal/framed/FramedConnection$Builder;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
move v1, v3
|
|
|
|
:cond_1
|
|
iput v1, p0, Lokhttp3/internal/framed/FramedConnection;->nextPingId:I
|
|
|
|
invoke-static {p1}, Lokhttp3/internal/framed/FramedConnection$Builder;->access$200(Lokhttp3/internal/framed/FramedConnection$Builder;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->okHttpSettings:Lokhttp3/internal/framed/Settings;
|
|
|
|
const/high16 v1, 0x1000000
|
|
|
|
invoke-virtual {v0, v10, v2, v1}, Lokhttp3/internal/framed/Settings;->set(III)Lokhttp3/internal/framed/Settings;
|
|
|
|
:cond_2
|
|
invoke-static {p1}, Lokhttp3/internal/framed/FramedConnection$Builder;->access$400(Lokhttp3/internal/framed/FramedConnection$Builder;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->hostname:Ljava/lang/String;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
sget-object v1, Lokhttp3/Protocol;->HTTP_2:Lokhttp3/Protocol;
|
|
|
|
if-ne v0, v1, :cond_4
|
|
|
|
new-instance v0, Lokhttp3/internal/framed/Http2;
|
|
|
|
invoke-direct {v0}, Lokhttp3/internal/framed/Http2;-><init>()V
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->variant:Lokhttp3/internal/framed/Variant;
|
|
|
|
new-instance v1, Ljava/util/concurrent/ThreadPoolExecutor;
|
|
|
|
const-wide/16 v4, 0x3c
|
|
|
|
sget-object v6, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
new-instance v7, Ljava/util/concurrent/LinkedBlockingQueue;
|
|
|
|
invoke-direct {v7}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V
|
|
|
|
const-string v0, "OkHttp %s Push Observer"
|
|
|
|
new-array v8, v3, [Ljava/lang/Object;
|
|
|
|
iget-object v9, p0, Lokhttp3/internal/framed/FramedConnection;->hostname:Ljava/lang/String;
|
|
|
|
aput-object v9, v8, v2
|
|
|
|
invoke-static {v0, v8}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v3}, Lokhttp3/internal/Util;->threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-direct/range {v1 .. v8}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V
|
|
|
|
iput-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->pushExecutor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->peerSettings:Lokhttp3/internal/framed/Settings;
|
|
|
|
const v1, 0xffff
|
|
|
|
invoke-virtual {v0, v10, v2, v1}, Lokhttp3/internal/framed/Settings;->set(III)Lokhttp3/internal/framed/Settings;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->peerSettings:Lokhttp3/internal/framed/Settings;
|
|
|
|
const/4 v1, 0x5
|
|
|
|
const/16 v3, 0x4000
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Lokhttp3/internal/framed/Settings;->set(III)Lokhttp3/internal/framed/Settings;
|
|
|
|
:goto_1
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->peerSettings:Lokhttp3/internal/framed/Settings;
|
|
|
|
const/high16 v1, 0x10000
|
|
|
|
invoke-virtual {v0, v1}, Lokhttp3/internal/framed/Settings;->getInitialWindowSize(I)I
|
|
|
|
move-result v0
|
|
|
|
int-to-long v0, v0
|
|
|
|
iput-wide v0, p0, Lokhttp3/internal/framed/FramedConnection;->bytesLeftInWriteWindow:J
|
|
|
|
invoke-static {p1}, Lokhttp3/internal/framed/FramedConnection$Builder;->access$500(Lokhttp3/internal/framed/FramedConnection$Builder;)Ljava/net/Socket;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->socket:Ljava/net/Socket;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->variant:Lokhttp3/internal/framed/Variant;
|
|
|
|
invoke-static {p1}, Lokhttp3/internal/framed/FramedConnection$Builder;->access$600(Lokhttp3/internal/framed/FramedConnection$Builder;)Lokio/BufferedSink;
|
|
|
|
move-result-object v1
|
|
|
|
iget-boolean v2, p0, Lokhttp3/internal/framed/FramedConnection;->client:Z
|
|
|
|
invoke-interface {v0, v1, v2}, Lokhttp3/internal/framed/Variant;->newWriter(Lokio/BufferedSink;Z)Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
new-instance v0, Lokhttp3/internal/framed/FramedConnection$Reader;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->variant:Lokhttp3/internal/framed/Variant;
|
|
|
|
invoke-static {p1}, Lokhttp3/internal/framed/FramedConnection$Builder;->access$700(Lokhttp3/internal/framed/FramedConnection$Builder;)Lokio/BufferedSource;
|
|
|
|
move-result-object v2
|
|
|
|
iget-boolean v3, p0, Lokhttp3/internal/framed/FramedConnection;->client:Z
|
|
|
|
invoke-interface {v1, v2, v3}, Lokhttp3/internal/framed/Variant;->newReader(Lokio/BufferedSource;Z)Lokhttp3/internal/framed/FrameReader;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, p0, v1, v11}, Lokhttp3/internal/framed/FramedConnection$Reader;-><init>(Lokhttp3/internal/framed/FramedConnection;Lokhttp3/internal/framed/FrameReader;Lokhttp3/internal/framed/FramedConnection$1;)V
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->readerRunnable:Lokhttp3/internal/framed/FramedConnection$Reader;
|
|
|
|
new-instance v0, Ljava/lang/Thread;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->readerRunnable:Lokhttp3/internal/framed/FramedConnection$Reader;
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Thread;->start()V
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
move v0, v1
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_4
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
sget-object v1, Lokhttp3/Protocol;->SPDY_3:Lokhttp3/Protocol;
|
|
|
|
if-ne v0, v1, :cond_5
|
|
|
|
new-instance v0, Lokhttp3/internal/framed/Spdy3;
|
|
|
|
invoke-direct {v0}, Lokhttp3/internal/framed/Spdy3;-><init>()V
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->variant:Lokhttp3/internal/framed/Variant;
|
|
|
|
iput-object v11, p0, Lokhttp3/internal/framed/FramedConnection;->pushExecutor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
new-instance v0, Ljava/lang/AssertionError;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method synthetic constructor <init>(Lokhttp3/internal/framed/FramedConnection$Builder;Lokhttp3/internal/framed/FramedConnection$1;)V
|
|
.locals 0
|
|
.param p1, "x0" # Lokhttp3/internal/framed/FramedConnection$Builder;
|
|
.param p2, "x1" # Lokhttp3/internal/framed/FramedConnection$1;
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/framed/FramedConnection;-><init>(Lokhttp3/internal/framed/FramedConnection$Builder;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$1100(Lokhttp3/internal/framed/FramedConnection;)Ljava/lang/String;
|
|
.locals 1
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->hostname:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$1200(Lokhttp3/internal/framed/FramedConnection;Lokhttp3/internal/framed/ErrorCode;Lokhttp3/internal/framed/ErrorCode;)V
|
|
.locals 0
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
.param p1, "x1" # Lokhttp3/internal/framed/ErrorCode;
|
|
.param p2, "x2" # Lokhttp3/internal/framed/ErrorCode;
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-direct {p0, p1, p2}, Lokhttp3/internal/framed/FramedConnection;->close(Lokhttp3/internal/framed/ErrorCode;Lokhttp3/internal/framed/ErrorCode;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$1300(Lokhttp3/internal/framed/FramedConnection;I)Z
|
|
.locals 1
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
.param p1, "x1" # I
|
|
|
|
.prologue
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/framed/FramedConnection;->pushedStream(I)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method static synthetic access$1400(Lokhttp3/internal/framed/FramedConnection;ILokio/BufferedSource;IZ)V
|
|
.locals 0
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
.param p1, "x1" # I
|
|
.param p2, "x2" # Lokio/BufferedSource;
|
|
.param p3, "x3" # I
|
|
.param p4, "x4" # Z
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lokhttp3/internal/framed/FramedConnection;->pushDataLater(ILokio/BufferedSource;IZ)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$1500(Lokhttp3/internal/framed/FramedConnection;ILjava/util/List;Z)V
|
|
.locals 0
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
.param p1, "x1" # I
|
|
.param p2, "x2" # Ljava/util/List;
|
|
.param p3, "x3" # Z
|
|
|
|
.prologue
|
|
invoke-direct {p0, p1, p2, p3}, Lokhttp3/internal/framed/FramedConnection;->pushHeadersLater(ILjava/util/List;Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$1600(Lokhttp3/internal/framed/FramedConnection;)Z
|
|
.locals 1
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
|
|
.prologue
|
|
iget-boolean v0, p0, Lokhttp3/internal/framed/FramedConnection;->shutdown:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method static synthetic access$1602(Lokhttp3/internal/framed/FramedConnection;Z)Z
|
|
.locals 0
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
.param p1, "x1" # Z
|
|
|
|
.prologue
|
|
iput-boolean p1, p0, Lokhttp3/internal/framed/FramedConnection;->shutdown:Z
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method static synthetic access$1700(Lokhttp3/internal/framed/FramedConnection;)I
|
|
.locals 1
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
|
|
.prologue
|
|
iget v0, p0, Lokhttp3/internal/framed/FramedConnection;->lastGoodStreamId:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method static synthetic access$1702(Lokhttp3/internal/framed/FramedConnection;I)I
|
|
.locals 0
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
.param p1, "x1" # I
|
|
|
|
.prologue
|
|
iput p1, p0, Lokhttp3/internal/framed/FramedConnection;->lastGoodStreamId:I
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method static synthetic access$1800(Lokhttp3/internal/framed/FramedConnection;)I
|
|
.locals 1
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
|
|
.prologue
|
|
iget v0, p0, Lokhttp3/internal/framed/FramedConnection;->nextStreamId:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method static synthetic access$1900(Lokhttp3/internal/framed/FramedConnection;)Ljava/util/Map;
|
|
.locals 1
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->streams:Ljava/util/Map;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$2000(Lokhttp3/internal/framed/FramedConnection;)Lokhttp3/internal/framed/FramedConnection$Listener;
|
|
.locals 1
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->listener:Lokhttp3/internal/framed/FramedConnection$Listener;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$2100()Ljava/util/concurrent/ExecutorService;
|
|
.locals 1
|
|
|
|
.prologue
|
|
sget-object v0, Lokhttp3/internal/framed/FramedConnection;->executor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$2200(Lokhttp3/internal/framed/FramedConnection;ILokhttp3/internal/framed/ErrorCode;)V
|
|
.locals 0
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
.param p1, "x1" # I
|
|
.param p2, "x2" # Lokhttp3/internal/framed/ErrorCode;
|
|
|
|
.prologue
|
|
invoke-direct {p0, p1, p2}, Lokhttp3/internal/framed/FramedConnection;->pushResetLater(ILokhttp3/internal/framed/ErrorCode;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$2300(Lokhttp3/internal/framed/FramedConnection;)Z
|
|
.locals 1
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
|
|
.prologue
|
|
iget-boolean v0, p0, Lokhttp3/internal/framed/FramedConnection;->receivedInitialPeerSettings:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method static synthetic access$2302(Lokhttp3/internal/framed/FramedConnection;Z)Z
|
|
.locals 0
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
.param p1, "x1" # Z
|
|
|
|
.prologue
|
|
iput-boolean p1, p0, Lokhttp3/internal/framed/FramedConnection;->receivedInitialPeerSettings:Z
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method static synthetic access$2400(Lokhttp3/internal/framed/FramedConnection;I)Lokhttp3/internal/framed/Ping;
|
|
.locals 1
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
.param p1, "x1" # I
|
|
|
|
.prologue
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/framed/FramedConnection;->removePing(I)Lokhttp3/internal/framed/Ping;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$2500(Lokhttp3/internal/framed/FramedConnection;ZIILokhttp3/internal/framed/Ping;)V
|
|
.locals 0
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
.param p1, "x1" # Z
|
|
.param p2, "x2" # I
|
|
.param p3, "x3" # I
|
|
.param p4, "x4" # Lokhttp3/internal/framed/Ping;
|
|
|
|
.prologue
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lokhttp3/internal/framed/FramedConnection;->writePingLater(ZIILokhttp3/internal/framed/Ping;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$2600(Lokhttp3/internal/framed/FramedConnection;ILjava/util/List;)V
|
|
.locals 0
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
.param p1, "x1" # I
|
|
.param p2, "x2" # Ljava/util/List;
|
|
|
|
.prologue
|
|
invoke-direct {p0, p1, p2}, Lokhttp3/internal/framed/FramedConnection;->pushRequestLater(ILjava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$2700(Lokhttp3/internal/framed/FramedConnection;)Lokhttp3/internal/framed/PushObserver;
|
|
.locals 1
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->pushObserver:Lokhttp3/internal/framed/PushObserver;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$2800(Lokhttp3/internal/framed/FramedConnection;)Ljava/util/Set;
|
|
.locals 1
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->currentPushRequests:Ljava/util/Set;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static synthetic access$900(Lokhttp3/internal/framed/FramedConnection;ZIILokhttp3/internal/framed/Ping;)V
|
|
.locals 0
|
|
.param p0, "x0" # Lokhttp3/internal/framed/FramedConnection;
|
|
.param p1, "x1" # Z
|
|
.param p2, "x2" # I
|
|
.param p3, "x3" # I
|
|
.param p4, "x4" # Lokhttp3/internal/framed/Ping;
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lokhttp3/internal/framed/FramedConnection;->writePing(ZIILokhttp3/internal/framed/Ping;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private close(Lokhttp3/internal/framed/ErrorCode;Lokhttp3/internal/framed/ErrorCode;)V
|
|
.locals 10
|
|
.param p1, "connectionCode" # Lokhttp3/internal/framed/ErrorCode;
|
|
.param p2, "streamCode" # Lokhttp3/internal/framed/ErrorCode;
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
const/4 v8, 0x0
|
|
|
|
sget-boolean v7, Lokhttp3/internal/framed/FramedConnection;->$assertionsDisabled:Z
|
|
|
|
if-nez v7, :cond_0
|
|
|
|
invoke-static {p0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
|
|
|
|
move-result v7
|
|
|
|
if-eqz v7, :cond_0
|
|
|
|
new-instance v7, Ljava/lang/AssertionError;
|
|
|
|
invoke-direct {v7}, Ljava/lang/AssertionError;-><init>()V
|
|
|
|
throw v7
|
|
|
|
:cond_0
|
|
const/4 v6, 0x0
|
|
|
|
.local v6, "thrown":Ljava/io/IOException;
|
|
:try_start_0
|
|
invoke-virtual {p0, p1}, Lokhttp3/internal/framed/FramedConnection;->shutdown(Lokhttp3/internal/framed/ErrorCode;)V
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:goto_0
|
|
const/4 v5, 0x0
|
|
|
|
.local v5, "streamsToClose":[Lokhttp3/internal/framed/FramedStream;
|
|
const/4 v3, 0x0
|
|
|
|
.local v3, "pingsToCancel":[Lokhttp3/internal/framed/Ping;
|
|
monitor-enter p0
|
|
|
|
:try_start_1
|
|
iget-object v7, p0, Lokhttp3/internal/framed/FramedConnection;->streams:Ljava/util/Map;
|
|
|
|
invoke-interface {v7}, Ljava/util/Map;->isEmpty()Z
|
|
|
|
move-result v7
|
|
|
|
if-nez v7, :cond_1
|
|
|
|
iget-object v7, p0, Lokhttp3/internal/framed/FramedConnection;->streams:Ljava/util/Map;
|
|
|
|
invoke-interface {v7}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v7
|
|
|
|
iget-object v9, p0, Lokhttp3/internal/framed/FramedConnection;->streams:Ljava/util/Map;
|
|
|
|
invoke-interface {v9}, Ljava/util/Map;->size()I
|
|
|
|
move-result v9
|
|
|
|
new-array v9, v9, [Lokhttp3/internal/framed/FramedStream;
|
|
|
|
invoke-interface {v7, v9}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object v7
|
|
|
|
move-object v0, v7
|
|
|
|
check-cast v0, [Lokhttp3/internal/framed/FramedStream;
|
|
|
|
move-object v5, v0
|
|
|
|
iget-object v7, p0, Lokhttp3/internal/framed/FramedConnection;->streams:Ljava/util/Map;
|
|
|
|
invoke-interface {v7}, Ljava/util/Map;->clear()V
|
|
|
|
const/4 v7, 0x0
|
|
|
|
invoke-direct {p0, v7}, Lokhttp3/internal/framed/FramedConnection;->setIdle(Z)V
|
|
|
|
:cond_1
|
|
iget-object v7, p0, Lokhttp3/internal/framed/FramedConnection;->pings:Ljava/util/Map;
|
|
|
|
if-eqz v7, :cond_2
|
|
|
|
iget-object v7, p0, Lokhttp3/internal/framed/FramedConnection;->pings:Ljava/util/Map;
|
|
|
|
invoke-interface {v7}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v7
|
|
|
|
iget-object v9, p0, Lokhttp3/internal/framed/FramedConnection;->pings:Ljava/util/Map;
|
|
|
|
invoke-interface {v9}, Ljava/util/Map;->size()I
|
|
|
|
move-result v9
|
|
|
|
new-array v9, v9, [Lokhttp3/internal/framed/Ping;
|
|
|
|
invoke-interface {v7, v9}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object v7
|
|
|
|
move-object v0, v7
|
|
|
|
check-cast v0, [Lokhttp3/internal/framed/Ping;
|
|
|
|
move-object v3, v0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
iput-object v7, p0, Lokhttp3/internal/framed/FramedConnection;->pings:Ljava/util/Map;
|
|
|
|
:cond_2
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
array-length v9, v5
|
|
|
|
move v7, v8
|
|
|
|
:goto_1
|
|
if-ge v7, v9, :cond_4
|
|
|
|
aget-object v4, v5, v7
|
|
|
|
.local v4, "stream":Lokhttp3/internal/framed/FramedStream;
|
|
:try_start_2
|
|
invoke-virtual {v4, p2}, Lokhttp3/internal/framed/FramedStream;->close(Lokhttp3/internal/framed/ErrorCode;)V
|
|
:try_end_2
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_1
|
|
|
|
:cond_3
|
|
:goto_2
|
|
add-int/lit8 v7, v7, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
.end local v3 # "pingsToCancel":[Lokhttp3/internal/framed/Ping;
|
|
.end local v4 # "stream":Lokhttp3/internal/framed/FramedStream;
|
|
.end local v5 # "streamsToClose":[Lokhttp3/internal/framed/FramedStream;
|
|
:catch_0
|
|
move-exception v1
|
|
|
|
.local v1, "e":Ljava/io/IOException;
|
|
move-object v6, v1
|
|
|
|
goto :goto_0
|
|
|
|
.end local v1 # "e":Ljava/io/IOException;
|
|
.restart local v3 # "pingsToCancel":[Lokhttp3/internal/framed/Ping;
|
|
.restart local v5 # "streamsToClose":[Lokhttp3/internal/framed/FramedStream;
|
|
:catchall_0
|
|
move-exception v7
|
|
|
|
:try_start_3
|
|
monitor-exit p0
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
throw v7
|
|
|
|
.restart local v4 # "stream":Lokhttp3/internal/framed/FramedStream;
|
|
:catch_1
|
|
move-exception v1
|
|
|
|
.restart local v1 # "e":Ljava/io/IOException;
|
|
if-eqz v6, :cond_3
|
|
|
|
move-object v6, v1
|
|
|
|
goto :goto_2
|
|
|
|
.end local v1 # "e":Ljava/io/IOException;
|
|
.end local v4 # "stream":Lokhttp3/internal/framed/FramedStream;
|
|
:cond_4
|
|
if-eqz v3, :cond_5
|
|
|
|
array-length v9, v3
|
|
|
|
move v7, v8
|
|
|
|
:goto_3
|
|
if-ge v7, v9, :cond_5
|
|
|
|
aget-object v2, v3, v7
|
|
|
|
.local v2, "ping":Lokhttp3/internal/framed/Ping;
|
|
invoke-virtual {v2}, Lokhttp3/internal/framed/Ping;->cancel()V
|
|
|
|
add-int/lit8 v7, v7, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
.end local v2 # "ping":Lokhttp3/internal/framed/Ping;
|
|
:cond_5
|
|
:try_start_4
|
|
iget-object v7, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
invoke-interface {v7}, Lokhttp3/internal/framed/FrameWriter;->close()V
|
|
:try_end_4
|
|
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_2
|
|
|
|
:cond_6
|
|
:goto_4
|
|
:try_start_5
|
|
iget-object v7, p0, Lokhttp3/internal/framed/FramedConnection;->socket:Ljava/net/Socket;
|
|
|
|
invoke-virtual {v7}, Ljava/net/Socket;->close()V
|
|
:try_end_5
|
|
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_3
|
|
|
|
:goto_5
|
|
if-eqz v6, :cond_7
|
|
|
|
throw v6
|
|
|
|
:catch_2
|
|
move-exception v1
|
|
|
|
.restart local v1 # "e":Ljava/io/IOException;
|
|
if-nez v6, :cond_6
|
|
|
|
move-object v6, v1
|
|
|
|
goto :goto_4
|
|
|
|
.end local v1 # "e":Ljava/io/IOException;
|
|
:catch_3
|
|
move-exception v1
|
|
|
|
.restart local v1 # "e":Ljava/io/IOException;
|
|
move-object v6, v1
|
|
|
|
goto :goto_5
|
|
|
|
.end local v1 # "e":Ljava/io/IOException;
|
|
:cond_7
|
|
return-void
|
|
.end method
|
|
|
|
.method private newStream(ILjava/util/List;ZZ)Lokhttp3/internal/framed/FramedStream;
|
|
.locals 9
|
|
.param p1, "associatedStreamId" # I
|
|
.param p3, "out" # Z
|
|
.param p4, "in" # Z
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(I",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Lokhttp3/internal/framed/Header;",
|
|
">;ZZ)",
|
|
"Lokhttp3/internal/framed/FramedStream;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p2, "requestHeaders":Ljava/util/List;, "Ljava/util/List<Lokhttp3/internal/framed/Header;>;"
|
|
const/4 v4, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
move v3, v4
|
|
|
|
.local v3, "outFinished":Z
|
|
:goto_0
|
|
if-nez p4, :cond_1
|
|
|
|
.local v4, "inFinished":Z
|
|
:goto_1
|
|
iget-object v8, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
monitor-enter v8
|
|
|
|
:try_start_0
|
|
monitor-enter p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
:try_start_1
|
|
iget-boolean v2, p0, Lokhttp3/internal/framed/FramedConnection;->shutdown:Z
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
new-instance v2, Ljava/io/IOException;
|
|
|
|
const-string v5, "shutdown"
|
|
|
|
invoke-direct {v2, v5}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:catchall_0
|
|
move-exception v2
|
|
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
:try_start_2
|
|
throw v2
|
|
|
|
:catchall_1
|
|
move-exception v2
|
|
|
|
monitor-exit v8
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
|
|
|
throw v2
|
|
|
|
.end local v3 # "outFinished":Z
|
|
.end local v4 # "inFinished":Z
|
|
:cond_0
|
|
move v3, v2
|
|
|
|
goto :goto_0
|
|
|
|
.restart local v3 # "outFinished":Z
|
|
:cond_1
|
|
move v4, v2
|
|
|
|
goto :goto_1
|
|
|
|
.restart local v4 # "inFinished":Z
|
|
:cond_2
|
|
:try_start_3
|
|
iget v1, p0, Lokhttp3/internal/framed/FramedConnection;->nextStreamId:I
|
|
|
|
.local v1, "streamId":I
|
|
iget v2, p0, Lokhttp3/internal/framed/FramedConnection;->nextStreamId:I
|
|
|
|
add-int/lit8 v2, v2, 0x2
|
|
|
|
iput v2, p0, Lokhttp3/internal/framed/FramedConnection;->nextStreamId:I
|
|
|
|
new-instance v0, Lokhttp3/internal/framed/FramedStream;
|
|
|
|
move-object v2, p0
|
|
|
|
move-object v5, p2
|
|
|
|
invoke-direct/range {v0 .. v5}, Lokhttp3/internal/framed/FramedStream;-><init>(ILokhttp3/internal/framed/FramedConnection;ZZLjava/util/List;)V
|
|
|
|
.local v0, "stream":Lokhttp3/internal/framed/FramedStream;
|
|
invoke-virtual {v0}, Lokhttp3/internal/framed/FramedStream;->isOpen()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/framed/FramedConnection;->streams:Ljava/util/Map;
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v2, v5, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {p0, v2}, Lokhttp3/internal/framed/FramedConnection;->setIdle(Z)V
|
|
|
|
:cond_3
|
|
monitor-exit p0
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
if-nez p1, :cond_5
|
|
|
|
:try_start_4
|
|
iget-object v2, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
move v5, v1
|
|
|
|
move v6, p1
|
|
|
|
move-object v7, p2
|
|
|
|
invoke-interface/range {v2 .. v7}, Lokhttp3/internal/framed/FrameWriter;->synStream(ZZIILjava/util/List;)V
|
|
|
|
:goto_2
|
|
monitor-exit v8
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1
|
|
|
|
if-nez p3, :cond_4
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
invoke-interface {v2}, Lokhttp3/internal/framed/FrameWriter;->flush()V
|
|
|
|
:cond_4
|
|
return-object v0
|
|
|
|
:cond_5
|
|
:try_start_5
|
|
iget-boolean v2, p0, Lokhttp3/internal/framed/FramedConnection;->client:Z
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
new-instance v2, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v5, "client streams shouldn\'t have associated stream IDs"
|
|
|
|
invoke-direct {v2, v5}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_6
|
|
iget-object v2, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
invoke-interface {v2, p1, v1, p2}, Lokhttp3/internal/framed/FrameWriter;->pushPromise(IILjava/util/List;)V
|
|
:try_end_5
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_1
|
|
|
|
goto :goto_2
|
|
.end method
|
|
|
|
.method private pushDataLater(ILokio/BufferedSource;IZ)V
|
|
.locals 9
|
|
.param p1, "streamId" # I
|
|
.param p2, "source" # Lokio/BufferedSource;
|
|
.param p3, "byteCount" # I
|
|
.param p4, "inFinished" # Z
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
new-instance v5, Lokio/Buffer;
|
|
|
|
invoke-direct {v5}, Lokio/Buffer;-><init>()V
|
|
|
|
.local v5, "buffer":Lokio/Buffer;
|
|
int-to-long v0, p3
|
|
|
|
invoke-interface {p2, v0, v1}, Lokio/BufferedSource;->require(J)V
|
|
|
|
int-to-long v0, p3
|
|
|
|
invoke-interface {p2, v5, v0, v1}, Lokio/BufferedSource;->read(Lokio/Buffer;J)J
|
|
|
|
invoke-virtual {v5}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v0
|
|
|
|
int-to-long v2, p3
|
|
|
|
cmp-long v0, v0, v2
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
new-instance v0, Ljava/io/IOException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v5}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, " != "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_0
|
|
iget-object v8, p0, Lokhttp3/internal/framed/FramedConnection;->pushExecutor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
new-instance v0, Lokhttp3/internal/framed/FramedConnection$6;
|
|
|
|
const-string v2, "OkHttp %s Push Data[%s]"
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-array v3, v1, [Ljava/lang/Object;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/framed/FramedConnection;->hostname:Ljava/lang/String;
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
move-object v1, p0
|
|
|
|
move v4, p1
|
|
|
|
move v6, p3
|
|
|
|
move v7, p4
|
|
|
|
invoke-direct/range {v0 .. v7}, Lokhttp3/internal/framed/FramedConnection$6;-><init>(Lokhttp3/internal/framed/FramedConnection;Ljava/lang/String;[Ljava/lang/Object;ILokio/Buffer;IZ)V
|
|
|
|
invoke-interface {v8, v0}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private pushHeadersLater(ILjava/util/List;Z)V
|
|
.locals 8
|
|
.param p1, "streamId" # I
|
|
.param p3, "inFinished" # Z
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(I",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Lokhttp3/internal/framed/Header;",
|
|
">;Z)V"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p2, "requestHeaders":Ljava/util/List;, "Ljava/util/List<Lokhttp3/internal/framed/Header;>;"
|
|
iget-object v7, p0, Lokhttp3/internal/framed/FramedConnection;->pushExecutor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
new-instance v0, Lokhttp3/internal/framed/FramedConnection$5;
|
|
|
|
const-string v2, "OkHttp %s Push Headers[%s]"
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-array v3, v1, [Ljava/lang/Object;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/framed/FramedConnection;->hostname:Ljava/lang/String;
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
move-object v1, p0
|
|
|
|
move v4, p1
|
|
|
|
move-object v5, p2
|
|
|
|
move v6, p3
|
|
|
|
invoke-direct/range {v0 .. v6}, Lokhttp3/internal/framed/FramedConnection$5;-><init>(Lokhttp3/internal/framed/FramedConnection;Ljava/lang/String;[Ljava/lang/Object;ILjava/util/List;Z)V
|
|
|
|
invoke-interface {v7, v0}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private pushRequestLater(ILjava/util/List;)V
|
|
.locals 7
|
|
.param p1, "streamId" # I
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(I",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Lokhttp3/internal/framed/Header;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p2, "requestHeaders":Ljava/util/List;, "Ljava/util/List<Lokhttp3/internal/framed/Header;>;"
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->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_0
|
|
|
|
sget-object v0, Lokhttp3/internal/framed/ErrorCode;->PROTOCOL_ERROR:Lokhttp3/internal/framed/ErrorCode;
|
|
|
|
invoke-virtual {p0, p1, v0}, Lokhttp3/internal/framed/FramedConnection;->writeSynResetLater(ILokhttp3/internal/framed/ErrorCode;)V
|
|
|
|
monitor-exit p0
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->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
|
|
|
|
monitor-exit p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
iget-object v6, p0, Lokhttp3/internal/framed/FramedConnection;->pushExecutor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
new-instance v0, Lokhttp3/internal/framed/FramedConnection$4;
|
|
|
|
const-string v2, "OkHttp %s Push Request[%s]"
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-array v3, v1, [Ljava/lang/Object;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/framed/FramedConnection;->hostname:Ljava/lang/String;
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
move-object v1, p0
|
|
|
|
move v4, p1
|
|
|
|
move-object v5, p2
|
|
|
|
invoke-direct/range {v0 .. v5}, Lokhttp3/internal/framed/FramedConnection$4;-><init>(Lokhttp3/internal/framed/FramedConnection;Ljava/lang/String;[Ljava/lang/Object;ILjava/util/List;)V
|
|
|
|
invoke-interface {v6, v0}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
:try_start_1
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private pushResetLater(ILokhttp3/internal/framed/ErrorCode;)V
|
|
.locals 7
|
|
.param p1, "streamId" # I
|
|
.param p2, "errorCode" # Lokhttp3/internal/framed/ErrorCode;
|
|
|
|
.prologue
|
|
iget-object v6, p0, Lokhttp3/internal/framed/FramedConnection;->pushExecutor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
new-instance v0, Lokhttp3/internal/framed/FramedConnection$7;
|
|
|
|
const-string v2, "OkHttp %s Push Reset[%s]"
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-array v3, v1, [Ljava/lang/Object;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/framed/FramedConnection;->hostname:Ljava/lang/String;
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
move-object v1, p0
|
|
|
|
move v4, p1
|
|
|
|
move-object v5, p2
|
|
|
|
invoke-direct/range {v0 .. v5}, Lokhttp3/internal/framed/FramedConnection$7;-><init>(Lokhttp3/internal/framed/FramedConnection;Ljava/lang/String;[Ljava/lang/Object;ILokhttp3/internal/framed/ErrorCode;)V
|
|
|
|
invoke-interface {v6, v0}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private pushedStream(I)Z
|
|
.locals 2
|
|
.param p1, "streamId" # I
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
sget-object v1, Lokhttp3/Protocol;->HTTP_2:Lokhttp3/Protocol;
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
and-int/lit8 v0, p1, 0x1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:goto_0
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private declared-synchronized removePing(I)Lokhttp3/internal/framed/Ping;
|
|
.locals 2
|
|
.param p1, "id" # I
|
|
|
|
.prologue
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->pings:Ljava/util/Map;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->pings:Ljava/util/Map;
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lokhttp3/internal/framed/Ping;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:goto_0
|
|
monitor-exit p0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private declared-synchronized setIdle(Z)V
|
|
.locals 2
|
|
.param p1, "value" # Z
|
|
|
|
.prologue
|
|
monitor-enter p0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
:try_start_0
|
|
invoke-static {}, Ljava/lang/System;->nanoTime()J
|
|
|
|
move-result-wide v0
|
|
|
|
:goto_0
|
|
iput-wide v0, p0, Lokhttp3/internal/framed/FramedConnection;->idleStartTimeNs:J
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-wide v0, 0x7fffffffffffffffL
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private writePing(ZIILokhttp3/internal/framed/Ping;)V
|
|
.locals 2
|
|
.param p1, "reply" # Z
|
|
.param p2, "payload1" # I
|
|
.param p3, "payload2" # I
|
|
.param p4, "ping" # Lokhttp3/internal/framed/Ping;
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
monitor-enter v1
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
:try_start_0
|
|
invoke-virtual {p4}, Lokhttp3/internal/framed/Ping;->send()V
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
invoke-interface {v0, p1, p2, p3}, Lokhttp3/internal/framed/FrameWriter;->ping(ZII)V
|
|
|
|
monitor-exit v1
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit v1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private writePingLater(ZIILokhttp3/internal/framed/Ping;)V
|
|
.locals 9
|
|
.param p1, "reply" # Z
|
|
.param p2, "payload1" # I
|
|
.param p3, "payload2" # I
|
|
.param p4, "ping" # Lokhttp3/internal/framed/Ping;
|
|
|
|
.prologue
|
|
sget-object v8, Lokhttp3/internal/framed/FramedConnection;->executor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
new-instance v0, Lokhttp3/internal/framed/FramedConnection$3;
|
|
|
|
const-string v2, "OkHttp %s ping %08x%08x"
|
|
|
|
const/4 v1, 0x3
|
|
|
|
new-array v3, v1, [Ljava/lang/Object;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/framed/FramedConnection;->hostname:Ljava/lang/String;
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
move-object v1, p0
|
|
|
|
move v4, p1
|
|
|
|
move v5, p2
|
|
|
|
move v6, p3
|
|
|
|
move-object v7, p4
|
|
|
|
invoke-direct/range {v0 .. v7}, Lokhttp3/internal/framed/FramedConnection$3;-><init>(Lokhttp3/internal/framed/FramedConnection;Ljava/lang/String;[Ljava/lang/Object;ZIILokhttp3/internal/framed/Ping;)V
|
|
|
|
invoke-interface {v8, v0}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method addBytesToWriteWindow(J)V
|
|
.locals 3
|
|
.param p1, "delta" # J
|
|
|
|
.prologue
|
|
iget-wide v0, p0, Lokhttp3/internal/framed/FramedConnection;->bytesLeftInWriteWindow:J
|
|
|
|
add-long/2addr v0, p1
|
|
|
|
iput-wide v0, p0, Lokhttp3/internal/framed/FramedConnection;->bytesLeftInWriteWindow:J
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v0, p1, v0
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public close()V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
sget-object v0, Lokhttp3/internal/framed/ErrorCode;->NO_ERROR:Lokhttp3/internal/framed/ErrorCode;
|
|
|
|
sget-object v1, Lokhttp3/internal/framed/ErrorCode;->CANCEL:Lokhttp3/internal/framed/ErrorCode;
|
|
|
|
invoke-direct {p0, v0, v1}, Lokhttp3/internal/framed/FramedConnection;->close(Lokhttp3/internal/framed/ErrorCode;Lokhttp3/internal/framed/ErrorCode;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public flush()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
invoke-interface {v0}, Lokhttp3/internal/framed/FrameWriter;->flush()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public declared-synchronized getIdleStartTimeNs()J
|
|
.locals 2
|
|
|
|
.prologue
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-wide v0, p0, Lokhttp3/internal/framed/FramedConnection;->idleStartTimeNs:J
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-wide v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public getProtocol()Lokhttp3/Protocol;
|
|
.locals 1
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method declared-synchronized getStream(I)Lokhttp3/internal/framed/FramedStream;
|
|
.locals 2
|
|
.param p1, "id" # I
|
|
|
|
.prologue
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->streams:Ljava/util/Map;
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lokhttp3/internal/framed/FramedStream;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized isIdle()Z
|
|
.locals 4
|
|
|
|
.prologue
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-wide v0, p0, Lokhttp3/internal/framed/FramedConnection;->idleStartTimeNs:J
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
const-wide v2, 0x7fffffffffffffffL
|
|
|
|
cmp-long v0, v0, v2
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:goto_0
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized maxConcurrentStreams()I
|
|
.locals 2
|
|
|
|
.prologue
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->peerSettings:Lokhttp3/internal/framed/Settings;
|
|
|
|
const v1, 0x7fffffff
|
|
|
|
invoke-virtual {v0, v1}, Lokhttp3/internal/framed/Settings;->getMaxConcurrentStreams(I)I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
move-result v0
|
|
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public newStream(Ljava/util/List;ZZ)Lokhttp3/internal/framed/FramedStream;
|
|
.locals 1
|
|
.param p2, "out" # Z
|
|
.param p3, "in" # Z
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Lokhttp3/internal/framed/Header;",
|
|
">;ZZ)",
|
|
"Lokhttp3/internal/framed/FramedStream;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p1, "requestHeaders":Ljava/util/List;, "Ljava/util/List<Lokhttp3/internal/framed/Header;>;"
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, v0, p1, p2, p3}, Lokhttp3/internal/framed/FramedConnection;->newStream(ILjava/util/List;ZZ)Lokhttp3/internal/framed/FramedStream;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public declared-synchronized openStreamCount()I
|
|
.locals 1
|
|
|
|
.prologue
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->streams:Ljava/util/Map;
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->size()I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
move-result v0
|
|
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public ping()Lokhttp3/internal/framed/Ping;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
new-instance v0, Lokhttp3/internal/framed/Ping;
|
|
|
|
invoke-direct {v0}, Lokhttp3/internal/framed/Ping;-><init>()V
|
|
|
|
.local v0, "ping":Lokhttp3/internal/framed/Ping;
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-boolean v2, p0, Lokhttp3/internal/framed/FramedConnection;->shutdown:Z
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
new-instance v2, Ljava/io/IOException;
|
|
|
|
const-string v3, "shutdown"
|
|
|
|
invoke-direct {v2, v3}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:catchall_0
|
|
move-exception v2
|
|
|
|
monitor-exit p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v2
|
|
|
|
:cond_0
|
|
:try_start_1
|
|
iget v1, p0, Lokhttp3/internal/framed/FramedConnection;->nextPingId:I
|
|
|
|
.local v1, "pingId":I
|
|
iget v2, p0, Lokhttp3/internal/framed/FramedConnection;->nextPingId:I
|
|
|
|
add-int/lit8 v2, v2, 0x2
|
|
|
|
iput v2, p0, Lokhttp3/internal/framed/FramedConnection;->nextPingId:I
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/framed/FramedConnection;->pings:Ljava/util/Map;
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
new-instance v2, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v2}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v2, p0, Lokhttp3/internal/framed/FramedConnection;->pings:Ljava/util/Map;
|
|
|
|
:cond_1
|
|
iget-object v2, p0, Lokhttp3/internal/framed/FramedConnection;->pings:Ljava/util/Map;
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const v3, 0x4f4b6f6b
|
|
|
|
invoke-direct {p0, v2, v1, v3, v0}, Lokhttp3/internal/framed/FramedConnection;->writePing(ZIILokhttp3/internal/framed/Ping;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public pushStream(ILjava/util/List;Z)Lokhttp3/internal/framed/FramedStream;
|
|
.locals 2
|
|
.param p1, "associatedStreamId" # I
|
|
.param p3, "out" # Z
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(I",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Lokhttp3/internal/framed/Header;",
|
|
">;Z)",
|
|
"Lokhttp3/internal/framed/FramedStream;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p2, "requestHeaders":Ljava/util/List;, "Ljava/util/List<Lokhttp3/internal/framed/Header;>;"
|
|
iget-boolean v0, p0, Lokhttp3/internal/framed/FramedConnection;->client:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "Client cannot push requests."
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
sget-object v1, Lokhttp3/Protocol;->HTTP_2:Lokhttp3/Protocol;
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "protocol != HTTP_2"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, p1, p2, p3, v0}, Lokhttp3/internal/framed/FramedConnection;->newStream(ILjava/util/List;ZZ)Lokhttp3/internal/framed/FramedStream;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method declared-synchronized removeStream(I)Lokhttp3/internal/framed/FramedStream;
|
|
.locals 3
|
|
.param p1, "streamId" # I
|
|
|
|
.prologue
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->streams:Ljava/util/Map;
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lokhttp3/internal/framed/FramedStream;
|
|
|
|
.local v0, "stream":Lokhttp3/internal/framed/FramedStream;
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->streams:Ljava/util/Map;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {p0, v1}, Lokhttp3/internal/framed/FramedConnection;->setIdle(Z)V
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-object v0
|
|
|
|
.end local v0 # "stream":Lokhttp3/internal/framed/FramedStream;
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit p0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public sendConnectionPreface()V
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
const/high16 v3, 0x10000
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
invoke-interface {v1}, Lokhttp3/internal/framed/FrameWriter;->connectionPreface()V
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/framed/FramedConnection;->okHttpSettings:Lokhttp3/internal/framed/Settings;
|
|
|
|
invoke-interface {v1, v2}, Lokhttp3/internal/framed/FrameWriter;->settings(Lokhttp3/internal/framed/Settings;)V
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->okHttpSettings:Lokhttp3/internal/framed/Settings;
|
|
|
|
invoke-virtual {v1, v3}, Lokhttp3/internal/framed/Settings;->getInitialWindowSize(I)I
|
|
|
|
move-result v0
|
|
|
|
.local v0, "windowSize":I
|
|
if-eq v0, v3, :cond_0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
sub-int v3, v0, v3
|
|
|
|
int-to-long v4, v3
|
|
|
|
invoke-interface {v1, v2, v4, v5}, Lokhttp3/internal/framed/FrameWriter;->windowUpdate(IJ)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setSettings(Lokhttp3/internal/framed/Settings;)V
|
|
.locals 3
|
|
.param p1, "settings" # Lokhttp3/internal/framed/Settings;
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
monitor-enter v1
|
|
|
|
:try_start_0
|
|
monitor-enter p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
:try_start_1
|
|
iget-boolean v0, p0, Lokhttp3/internal/framed/FramedConnection;->shutdown:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
new-instance v0, Ljava/io/IOException;
|
|
|
|
const-string v2, "shutdown"
|
|
|
|
invoke-direct {v0, v2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
:try_start_2
|
|
throw v0
|
|
|
|
:catchall_1
|
|
move-exception v0
|
|
|
|
monitor-exit v1
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
|
|
|
throw v0
|
|
|
|
:cond_0
|
|
:try_start_3
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->okHttpSettings:Lokhttp3/internal/framed/Settings;
|
|
|
|
invoke-virtual {v0, p1}, Lokhttp3/internal/framed/Settings;->merge(Lokhttp3/internal/framed/Settings;)V
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
invoke-interface {v0, p1}, Lokhttp3/internal/framed/FrameWriter;->settings(Lokhttp3/internal/framed/Settings;)V
|
|
|
|
monitor-exit p0
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
:try_start_4
|
|
monitor-exit v1
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public shutdown(Lokhttp3/internal/framed/ErrorCode;)V
|
|
.locals 4
|
|
.param p1, "statusCode" # Lokhttp3/internal/framed/ErrorCode;
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v2, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
monitor-enter v2
|
|
|
|
: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/framed/FramedConnection;->shutdown:Z
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
:try_start_2
|
|
monitor-exit v2
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v1, 0x1
|
|
|
|
:try_start_3
|
|
iput-boolean v1, p0, Lokhttp3/internal/framed/FramedConnection;->shutdown:Z
|
|
|
|
iget v0, p0, Lokhttp3/internal/framed/FramedConnection;->lastGoodStreamId:I
|
|
|
|
.local v0, "lastGoodStreamId":I
|
|
monitor-exit p0
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
:try_start_4
|
|
iget-object v1, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
sget-object v3, Lokhttp3/internal/Util;->EMPTY_BYTE_ARRAY:[B
|
|
|
|
invoke-interface {v1, v0, p1, v3}, Lokhttp3/internal/framed/FrameWriter;->goAway(ILokhttp3/internal/framed/ErrorCode;[B)V
|
|
|
|
monitor-exit v2
|
|
|
|
goto :goto_0
|
|
|
|
.end local v0 # "lastGoodStreamId":I
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit v2
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_0
|
|
|
|
throw v1
|
|
|
|
:catchall_1
|
|
move-exception v1
|
|
|
|
:try_start_5
|
|
monitor-exit p0
|
|
:try_end_5
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_1
|
|
|
|
:try_start_6
|
|
throw v1
|
|
:try_end_6
|
|
.catchall {:try_start_6 .. :try_end_6} :catchall_0
|
|
.end method
|
|
|
|
.method public writeData(IZLokio/Buffer;J)V
|
|
.locals 10
|
|
.param p1, "streamId" # I
|
|
.param p2, "outFinished" # Z
|
|
.param p3, "buffer" # Lokio/Buffer;
|
|
.param p4, "byteCount" # J
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
const/4 v3, 0x0
|
|
|
|
const-wide/16 v8, 0x0
|
|
|
|
cmp-long v2, p4, v8
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
invoke-interface {v2, p2, p1, p3, v3}, Lokhttp3/internal/framed/FrameWriter;->data(ZILokio/Buffer;I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
:cond_1
|
|
:try_start_0
|
|
iget-wide v4, p0, Lokhttp3/internal/framed/FramedConnection;->bytesLeftInWriteWindow:J
|
|
|
|
invoke-static {p4, p5, v4, v5}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v4
|
|
|
|
long-to-int v1, v4
|
|
|
|
.local v1, "toWrite":I
|
|
iget-object v2, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
invoke-interface {v2}, Lokhttp3/internal/framed/FrameWriter;->maxDataLength()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v1
|
|
|
|
iget-wide v4, p0, Lokhttp3/internal/framed/FramedConnection;->bytesLeftInWriteWindow:J
|
|
|
|
int-to-long v6, v1
|
|
|
|
sub-long/2addr v4, v6
|
|
|
|
iput-wide v4, p0, Lokhttp3/internal/framed/FramedConnection;->bytesLeftInWriteWindow:J
|
|
|
|
monitor-exit p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
int-to-long v4, v1
|
|
|
|
sub-long/2addr p4, v4
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
cmp-long v2, p4, v8
|
|
|
|
if-nez v2, :cond_4
|
|
|
|
const/4 v2, 0x1
|
|
|
|
:goto_0
|
|
invoke-interface {v4, v2, p1, p3, v1}, Lokhttp3/internal/framed/FrameWriter;->data(ZILokio/Buffer;I)V
|
|
|
|
.end local v1 # "toWrite":I
|
|
:cond_2
|
|
cmp-long v2, p4, v8
|
|
|
|
if-lez v2, :cond_0
|
|
|
|
monitor-enter p0
|
|
|
|
:goto_1
|
|
:try_start_1
|
|
iget-wide v4, p0, Lokhttp3/internal/framed/FramedConnection;->bytesLeftInWriteWindow:J
|
|
|
|
cmp-long v2, v4, v8
|
|
|
|
if-gtz v2, :cond_1
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/framed/FramedConnection;->streams:Ljava/util/Map;
|
|
|
|
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-nez v2, :cond_3
|
|
|
|
new-instance v2, Ljava/io/IOException;
|
|
|
|
const-string v3, "stream closed"
|
|
|
|
invoke-direct {v2, v3}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
:try_end_1
|
|
.catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_0
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
.local v0, "e":Ljava/lang/InterruptedException;
|
|
:try_start_2
|
|
new-instance v2, Ljava/io/InterruptedIOException;
|
|
|
|
invoke-direct {v2}, Ljava/io/InterruptedIOException;-><init>()V
|
|
|
|
throw v2
|
|
|
|
.end local v0 # "e":Ljava/lang/InterruptedException;
|
|
:catchall_0
|
|
move-exception v2
|
|
|
|
monitor-exit p0
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
throw v2
|
|
|
|
:cond_3
|
|
:try_start_3
|
|
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
|
|
:try_end_3
|
|
.catch Ljava/lang/InterruptedException; {:try_start_3 .. :try_end_3} :catch_0
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
goto :goto_1
|
|
|
|
.restart local v1 # "toWrite":I
|
|
:cond_4
|
|
move v2, v3
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method writeSynReply(IZLjava/util/List;)V
|
|
.locals 1
|
|
.param p1, "streamId" # I
|
|
.param p2, "outFinished" # Z
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(IZ",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Lokhttp3/internal/framed/Header;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p3, "alternating":Ljava/util/List;, "Ljava/util/List<Lokhttp3/internal/framed/Header;>;"
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
invoke-interface {v0, p2, p1, p3}, Lokhttp3/internal/framed/FrameWriter;->synReply(ZILjava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method writeSynReset(ILokhttp3/internal/framed/ErrorCode;)V
|
|
.locals 1
|
|
.param p1, "streamId" # I
|
|
.param p2, "statusCode" # Lokhttp3/internal/framed/ErrorCode;
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
iget-object v0, p0, Lokhttp3/internal/framed/FramedConnection;->frameWriter:Lokhttp3/internal/framed/FrameWriter;
|
|
|
|
invoke-interface {v0, p1, p2}, Lokhttp3/internal/framed/FrameWriter;->rstStream(ILokhttp3/internal/framed/ErrorCode;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method writeSynResetLater(ILokhttp3/internal/framed/ErrorCode;)V
|
|
.locals 7
|
|
.param p1, "streamId" # I
|
|
.param p2, "errorCode" # Lokhttp3/internal/framed/ErrorCode;
|
|
|
|
.prologue
|
|
sget-object v6, Lokhttp3/internal/framed/FramedConnection;->executor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
new-instance v0, Lokhttp3/internal/framed/FramedConnection$1;
|
|
|
|
const-string v2, "OkHttp %s stream %d"
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-array v3, v1, [Ljava/lang/Object;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/framed/FramedConnection;->hostname:Ljava/lang/String;
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v3, v1
|
|
|
|
move-object v1, p0
|
|
|
|
move v4, p1
|
|
|
|
move-object v5, p2
|
|
|
|
invoke-direct/range {v0 .. v5}, Lokhttp3/internal/framed/FramedConnection$1;-><init>(Lokhttp3/internal/framed/FramedConnection;Ljava/lang/String;[Ljava/lang/Object;ILokhttp3/internal/framed/ErrorCode;)V
|
|
|
|
invoke-interface {v6, v0}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method writeWindowUpdateLater(IJ)V
|
|
.locals 8
|
|
.param p1, "streamId" # I
|
|
.param p2, "unacknowledgedBytesRead" # J
|
|
|
|
.prologue
|
|
sget-object v0, Lokhttp3/internal/framed/FramedConnection;->executor:Ljava/util/concurrent/ExecutorService;
|
|
|
|
new-instance v1, Lokhttp3/internal/framed/FramedConnection$2;
|
|
|
|
const-string v3, "OkHttp Window Update %s stream %d"
|
|
|
|
const/4 v2, 0x2
|
|
|
|
new-array v4, v2, [Ljava/lang/Object;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
iget-object v5, p0, Lokhttp3/internal/framed/FramedConnection;->hostname:Ljava/lang/String;
|
|
|
|
aput-object v5, v4, v2
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v4, v2
|
|
|
|
move-object v2, p0
|
|
|
|
move v5, p1
|
|
|
|
move-wide v6, p2
|
|
|
|
invoke-direct/range {v1 .. v7}, Lokhttp3/internal/framed/FramedConnection$2;-><init>(Lokhttp3/internal/framed/FramedConnection;Ljava/lang/String;[Ljava/lang/Object;IJ)V
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
|
|
|
|
return-void
|
|
.end method
|