.class public final Lokhttp3/internal/ws/RealWebSocket; .super Ljava/lang/Object; .source "RealWebSocket.kt" # interfaces .implements Lokhttp3/WebSocket; .implements Lokhttp3/internal/ws/WebSocketReader$FrameCallback; # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lokhttp3/internal/ws/RealWebSocket$Message;, Lokhttp3/internal/ws/RealWebSocket$Close;, Lokhttp3/internal/ws/RealWebSocket$Streams;, Lokhttp3/internal/ws/RealWebSocket$WriterTask;, Lokhttp3/internal/ws/RealWebSocket$Companion; } .end annotation .annotation system Ldalvik/annotation/SourceDebugExtension; value = "SMAP\nRealWebSocket.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RealWebSocket.kt\nokhttp3/internal/ws/RealWebSocket\n+ 2 TaskQueue.kt\nokhttp3/internal/concurrent/TaskQueue\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 4 Util.kt\nokhttp3/internal/Util\n*L\n1#1,654:1\n84#2,4:655\n93#2,10:664\n1#3:659\n601#4,4:660\n*E\n*S KotlinDebug\n*F\n+ 1 RealWebSocket.kt\nokhttp3/internal/ws/RealWebSocket\n*L\n269#1,4:655\n512#1,10:664\n457#1,4:660\n*E\n" .end annotation .annotation runtime Lkotlin/Metadata; bv = { 0x1, 0x0, 0x3 } d1 = { "\u0000\u00b6\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u000e\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0008\n\u0002\u0008\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0007\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u001c\u0018\u0000 `2\u00020\u00012\u00020\u0002:\u0005_`abcB?\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\u0008\u0012\u0006\u0010\t\u001a\u00020\n\u0012\u0006\u0010\u000b\u001a\u00020\u000c\u0012\u0008\u0010\r\u001a\u0004\u0018\u00010\u000e\u0012\u0006\u0010\u000f\u001a\u00020\u000c\u00a2\u0006\u0002\u0010\u0010J\u0016\u00102\u001a\u0002032\u0006\u00104\u001a\u00020\u000c2\u0006\u00105\u001a\u000206J\u0008\u00107\u001a\u000203H\u0016J\u001f\u00108\u001a\u0002032\u0006\u00109\u001a\u00020:2\u0008\u0010;\u001a\u0004\u0018\u00010\u001a\u00020\u00122\u0006\u0010?\u001a\u00020%2\u0008\u0010@\u001a\u0004\u0018\u00010\u0018H\u0016J \u0010>\u001a\u00020\u00122\u0006\u0010?\u001a\u00020%2\u0008\u0010@\u001a\u0004\u0018\u00010\u00182\u0006\u0010A\u001a\u00020\u000cJ\u000e\u0010B\u001a\u0002032\u0006\u0010C\u001a\u00020DJ\u001c\u0010E\u001a\u0002032\n\u0010F\u001a\u00060Gj\u0002`H2\u0008\u00109\u001a\u0004\u0018\u00010:J\u0016\u0010I\u001a\u0002032\u0006\u0010\u001e\u001a\u00020\u00182\u0006\u0010*\u001a\u00020+J\u0006\u0010J\u001a\u000203J\u0018\u0010K\u001a\u0002032\u0006\u0010?\u001a\u00020%2\u0006\u0010@\u001a\u00020\u0018H\u0016J\u0010\u0010L\u001a\u0002032\u0006\u0010M\u001a\u00020\u0018H\u0016J\u0010\u0010L\u001a\u0002032\u0006\u0010N\u001a\u00020 H\u0016J\u0010\u0010O\u001a\u0002032\u0006\u0010P\u001a\u00020 H\u0016J\u0010\u0010Q\u001a\u0002032\u0006\u0010P\u001a\u00020 H\u0016J\u000e\u0010R\u001a\u00020\u00122\u0006\u0010P\u001a\u00020 J\u0006\u0010S\u001a\u00020\u0012J\u0008\u0010!\u001a\u00020\u000cH\u0016J\u0006\u0010\'\u001a\u00020%J\u0006\u0010(\u001a\u00020%J\u0008\u0010T\u001a\u00020\u0006H\u0016J\u0008\u0010U\u001a\u000203H\u0002J\u0010\u0010V\u001a\u00020\u00122\u0006\u0010M\u001a\u00020\u0018H\u0016J\u0010\u0010V\u001a\u00020\u00122\u0006\u0010N\u001a\u00020 H\u0016J\u0018\u0010V\u001a\u00020\u00122\u0006\u0010W\u001a\u00020 2\u0006\u0010X\u001a\u00020%H\u0002J\u0006\u0010)\u001a\u00020%J\u0006\u0010Y\u001a\u000203J\r\u0010Z\u001a\u00020\u0012H\u0000\u00a2\u0006\u0002\u0008[J\r\u0010\\\u001a\u000203H\u0000\u00a2\u0006\u0002\u0008]J\u000c\u0010^\u001a\u00020\u0012*\u00020\u000eH\u0002R\u000e\u0010\u0011\u001a\u00020\u0012X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0010\u0010\u0013\u001a\u0004\u0018\u00010\u0014X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0015\u001a\u00020\u0012X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0010\u0010\r\u001a\u0004\u0018\u00010\u000eX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0016\u001a\u00020\u0012X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0017\u001a\u00020\u0018X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u0007\u001a\u00020\u0008X\u0080\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0019\u0010\u001aR\u0014\u0010\u001b\u001a\u0008\u0012\u0004\u0012\u00020\u001d0\u001cX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000f\u001a\u00020\u000cX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0010\u0010\u001e\u001a\u0004\u0018\u00010\u0018X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\u000cX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u001f\u001a\u0008\u0012\u0004\u0012\u00020 0\u001cX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010!\u001a\u00020\u000cX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\nX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0010\u0010\"\u001a\u0004\u0018\u00010#X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010$\u001a\u00020%X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0010\u0010&\u001a\u0004\u0018\u00010\u0018X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\'\u001a\u00020%X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010(\u001a\u00020%X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010)\u001a\u00020%X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0010\u0010*\u001a\u0004\u0018\u00010+X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010,\u001a\u00020-X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0010\u0010.\u001a\u0004\u0018\u00010/X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0010\u00100\u001a\u0004\u0018\u000101X\u0082\u000e\u00a2\u0006\u0002\n\u0000\u00a8\u0006d" } d2 = { "Lokhttp3/internal/ws/RealWebSocket;", "Lokhttp3/WebSocket;", "Lokhttp3/internal/ws/WebSocketReader$FrameCallback;", "taskRunner", "Lokhttp3/internal/concurrent/TaskRunner;", "originalRequest", "Lokhttp3/Request;", "listener", "Lokhttp3/WebSocketListener;", "random", "Ljava/util/Random;", "pingIntervalMillis", "", "extensions", "Lokhttp3/internal/ws/WebSocketExtensions;", "minimumDeflateSize", "(Lokhttp3/internal/concurrent/TaskRunner;Lokhttp3/Request;Lokhttp3/WebSocketListener;Ljava/util/Random;JLokhttp3/internal/ws/WebSocketExtensions;J)V", "awaitingPong", "", "call", "Lokhttp3/Call;", "enqueuedClose", "failed", "key", "", "getListener$okhttp", "()Lokhttp3/WebSocketListener;", "messageAndCloseQueue", "Ljava/util/ArrayDeque;", "", "name", "pongQueue", "Lokio/ByteString;", "queueSize", "reader", "Lokhttp3/internal/ws/WebSocketReader;", "receivedCloseCode", "", "receivedCloseReason", "receivedPingCount", "receivedPongCount", "sentPingCount", "streams", "Lokhttp3/internal/ws/RealWebSocket$Streams;", "taskQueue", "Lokhttp3/internal/concurrent/TaskQueue;", "writer", "Lokhttp3/internal/ws/WebSocketWriter;", "writerTask", "Lokhttp3/internal/concurrent/Task;", "awaitTermination", "", "timeout", "timeUnit", "Ljava/util/concurrent/TimeUnit;", "cancel", "checkUpgradeSuccess", "response", "Lokhttp3/Response;", "exchange", "Lokhttp3/internal/connection/Exchange;", "checkUpgradeSuccess$okhttp", "close", "code", "reason", "cancelAfterCloseMillis", "connect", "client", "Lokhttp3/OkHttpClient;", "failWebSocket", "e", "Ljava/lang/Exception;", "Lkotlin/Exception;", "initReaderAndWriter", "loopReader", "onReadClose", "onReadMessage", "text", "bytes", "onReadPing", "payload", "onReadPong", "pong", "processNextFrame", "request", "runWriter", "send", "data", "formatOpcode", "tearDown", "writeOneFrame", "writeOneFrame$okhttp", "writePingFrame", "writePingFrame$okhttp", "isValid", "Close", "Companion", "Message", "Streams", "WriterTask", "okhttp" } k = 0x1 mv = { 0x1, 0x4, 0x0 } .end annotation # static fields .field private static final CANCEL_AFTER_CLOSE_MILLIS:J = 0xea60L .field public static final Companion:Lokhttp3/internal/ws/RealWebSocket$Companion; .field public static final DEFAULT_MINIMUM_DEFLATE_SIZE:J = 0x400L .field private static final MAX_QUEUE_SIZE:J = 0x1000000L .field private static final ONLY_HTTP1:Ljava/util/List; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/List<", "Lokhttp3/Protocol;", ">;" } .end annotation .end field # instance fields .field private awaitingPong:Z .field private call:Lokhttp3/Call; .field private enqueuedClose:Z .field private extensions:Lokhttp3/internal/ws/WebSocketExtensions; .field private failed:Z .field private final key:Ljava/lang/String; .field private final listener:Lokhttp3/WebSocketListener; .field private final messageAndCloseQueue:Ljava/util/ArrayDeque; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/ArrayDeque<", "Ljava/lang/Object;", ">;" } .end annotation .end field .field private minimumDeflateSize:J .field private name:Ljava/lang/String; .field private final originalRequest:Lokhttp3/Request; .field private final pingIntervalMillis:J .field private final pongQueue:Ljava/util/ArrayDeque; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/ArrayDeque<", "Lokio/ByteString;", ">;" } .end annotation .end field .field private queueSize:J .field private final random:Ljava/util/Random; .field private reader:Lokhttp3/internal/ws/WebSocketReader; .field private receivedCloseCode:I .field private receivedCloseReason:Ljava/lang/String; .field private receivedPingCount:I .field private receivedPongCount:I .field private sentPingCount:I .field private streams:Lokhttp3/internal/ws/RealWebSocket$Streams; .field private taskQueue:Lokhttp3/internal/concurrent/TaskQueue; .field private writer:Lokhttp3/internal/ws/WebSocketWriter; .field private writerTask:Lokhttp3/internal/concurrent/Task; # direct methods .method static constructor ()V .locals 2 new-instance v0, Lokhttp3/internal/ws/RealWebSocket$Companion; const/4 v1, 0x0 invoke-direct {v0, v1}, Lokhttp3/internal/ws/RealWebSocket$Companion;->(Lkotlin/jvm/internal/DefaultConstructorMarker;)V sput-object v0, Lokhttp3/internal/ws/RealWebSocket;->Companion:Lokhttp3/internal/ws/RealWebSocket$Companion; .line 629 sget-object v0, Lokhttp3/Protocol;->HTTP_1_1:Lokhttp3/Protocol; invoke-static {v0}, Lkotlin/collections/CollectionsKt;->listOf(Ljava/lang/Object;)Ljava/util/List; move-result-object v0 sput-object v0, Lokhttp3/internal/ws/RealWebSocket;->ONLY_HTTP1:Ljava/util/List; return-void .end method .method public constructor (Lokhttp3/internal/concurrent/TaskRunner;Lokhttp3/Request;Lokhttp3/WebSocketListener;Ljava/util/Random;JLokhttp3/internal/ws/WebSocketExtensions;J)V .locals 1 const-string v0, "taskRunner" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "originalRequest" invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "listener" invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "random" invoke-static {p4, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 53 invoke-direct {p0}, Ljava/lang/Object;->()V iput-object p2, p0, Lokhttp3/internal/ws/RealWebSocket;->originalRequest:Lokhttp3/Request; iput-object p3, p0, Lokhttp3/internal/ws/RealWebSocket;->listener:Lokhttp3/WebSocketListener; iput-object p4, p0, Lokhttp3/internal/ws/RealWebSocket;->random:Ljava/util/Random; iput-wide p5, p0, Lokhttp3/internal/ws/RealWebSocket;->pingIntervalMillis:J iput-object p7, p0, Lokhttp3/internal/ws/RealWebSocket;->extensions:Lokhttp3/internal/ws/WebSocketExtensions; iput-wide p8, p0, Lokhttp3/internal/ws/RealWebSocket;->minimumDeflateSize:J .line 85 invoke-virtual {p1}, Lokhttp3/internal/concurrent/TaskRunner;->newQueue()Lokhttp3/internal/concurrent/TaskQueue; move-result-object p1 iput-object p1, p0, Lokhttp3/internal/ws/RealWebSocket;->taskQueue:Lokhttp3/internal/concurrent/TaskQueue; .line 98 new-instance p1, Ljava/util/ArrayDeque; invoke-direct {p1}, Ljava/util/ArrayDeque;->()V iput-object p1, p0, Lokhttp3/internal/ws/RealWebSocket;->pongQueue:Ljava/util/ArrayDeque; .line 101 new-instance p1, Ljava/util/ArrayDeque; invoke-direct {p1}, Ljava/util/ArrayDeque;->()V iput-object p1, p0, Lokhttp3/internal/ws/RealWebSocket;->messageAndCloseQueue:Ljava/util/ArrayDeque; const/4 p1, -0x1 iput p1, p0, Lokhttp3/internal/ws/RealWebSocket;->receivedCloseCode:I const-string p1, "GET" .line 131 invoke-virtual {p2}, Lokhttp3/Request;->method()Ljava/lang/String; move-result-object p3 invoke-static {p1, p3}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p1 if-eqz p1, :cond_0 .line 135 sget-object p2, Lokio/ByteString;->Companion:Lokio/ByteString$Companion; const/16 p1, 0x10 new-array p3, p1, [B invoke-virtual {p4, p3}, Ljava/util/Random;->nextBytes([B)V sget-object p1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; const/4 p4, 0x0 const/4 p5, 0x0 const/4 p6, 0x3 const/4 p7, 0x0 invoke-static/range {p2 .. p7}, Lokio/ByteString$Companion;->of$default(Lokio/ByteString$Companion;[BIIILjava/lang/Object;)Lokio/ByteString; move-result-object p1 invoke-virtual {p1}, Lokio/ByteString;->base64()Ljava/lang/String; move-result-object p1 iput-object p1, p0, Lokhttp3/internal/ws/RealWebSocket;->key:Ljava/lang/String; return-void .line 132 :cond_0 new-instance p0, Ljava/lang/StringBuilder; const-string p1, "Request must be GET: " invoke-direct {p0, p1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p2}, Lokhttp3/Request;->method()Ljava/lang/String; move-result-object p1 invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 .line 131 new-instance p1, Ljava/lang/IllegalArgumentException; invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object p0 invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V check-cast p1, Ljava/lang/Throwable; throw p1 .end method .method public static final synthetic access$getExtensions$p(Lokhttp3/internal/ws/RealWebSocket;)Lokhttp3/internal/ws/WebSocketExtensions; .locals 0 .line 53 iget-object p0, p0, Lokhttp3/internal/ws/RealWebSocket;->extensions:Lokhttp3/internal/ws/WebSocketExtensions; return-object p0 .end method .method public static final synthetic access$getMessageAndCloseQueue$p(Lokhttp3/internal/ws/RealWebSocket;)Ljava/util/ArrayDeque; .locals 0 .line 53 iget-object p0, p0, Lokhttp3/internal/ws/RealWebSocket;->messageAndCloseQueue:Ljava/util/ArrayDeque; return-object p0 .end method .method public static final synthetic access$getName$p(Lokhttp3/internal/ws/RealWebSocket;)Ljava/lang/String; .locals 0 .line 53 iget-object p0, p0, Lokhttp3/internal/ws/RealWebSocket;->name:Ljava/lang/String; return-object p0 .end method .method public static final synthetic access$isValid(Lokhttp3/internal/ws/RealWebSocket;Lokhttp3/internal/ws/WebSocketExtensions;)Z .locals 0 .line 53 invoke-direct {p0, p1}, Lokhttp3/internal/ws/RealWebSocket;->isValid(Lokhttp3/internal/ws/WebSocketExtensions;)Z move-result p0 return p0 .end method .method public static final synthetic access$setExtensions$p(Lokhttp3/internal/ws/RealWebSocket;Lokhttp3/internal/ws/WebSocketExtensions;)V .locals 0 .line 53 iput-object p1, p0, Lokhttp3/internal/ws/RealWebSocket;->extensions:Lokhttp3/internal/ws/WebSocketExtensions; return-void .end method .method public static final synthetic access$setName$p(Lokhttp3/internal/ws/RealWebSocket;Ljava/lang/String;)V .locals 0 .line 53 iput-object p1, p0, Lokhttp3/internal/ws/RealWebSocket;->name:Ljava/lang/String; return-void .end method .method private final isValid(Lokhttp3/internal/ws/WebSocketExtensions;)Z .locals 1 .line 209 iget-boolean p0, p1, Lokhttp3/internal/ws/WebSocketExtensions;->unknownValues:Z const/4 v0, 0x0 if-eqz p0, :cond_0 return v0 .line 212 :cond_0 iget-object p0, p1, Lokhttp3/internal/ws/WebSocketExtensions;->clientMaxWindowBits:Ljava/lang/Integer; if-eqz p0, :cond_1 return v0 .line 215 :cond_1 iget-object p0, p1, Lokhttp3/internal/ws/WebSocketExtensions;->serverMaxWindowBits:Ljava/lang/Integer; if-eqz p0, :cond_3 iget-object p0, p1, Lokhttp3/internal/ws/WebSocketExtensions;->serverMaxWindowBits:Ljava/lang/Integer; invoke-virtual {p0}, Ljava/lang/Integer;->intValue()I move-result p0 const/16 p1, 0x8 if-gt p1, p0, :cond_2 const/16 p1, 0xf if-ge p1, p0, :cond_3 :cond_2 return v0 :cond_3 const/4 p0, 0x1 return p0 .end method .method private final runWriter()V .locals 7 .line 660 sget-boolean v0, Lokhttp3/internal/Util;->assertionsEnabled:Z if-eqz v0, :cond_1 invoke-static {p0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_0 goto :goto_0 .line 661 :cond_0 new-instance v0, Ljava/lang/AssertionError; new-instance v1, Ljava/lang/StringBuilder; const-string v2, "Thread " invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread; move-result-object v2 const-string v3, "Thread.currentThread()" invoke-static {v2, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual {v2}, Ljava/lang/Thread;->getName()Ljava/lang/String; move-result-object v2 invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, " MUST hold lock on " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 invoke-direct {v0, p0}, Ljava/lang/AssertionError;->(Ljava/lang/Object;)V check-cast v0, Ljava/lang/Throwable; throw v0 :cond_1 :goto_0 iget-object v2, p0, Lokhttp3/internal/ws/RealWebSocket;->writerTask:Lokhttp3/internal/concurrent/Task; if-eqz v2, :cond_2 iget-object v1, p0, Lokhttp3/internal/ws/RealWebSocket;->taskQueue:Lokhttp3/internal/concurrent/TaskQueue; const-wide/16 v3, 0x0 const/4 v5, 0x2 const/4 v6, 0x0 .line 461 invoke-static/range {v1 .. v6}, Lokhttp3/internal/concurrent/TaskQueue;->schedule$default(Lokhttp3/internal/concurrent/TaskQueue;Lokhttp3/internal/concurrent/Task;JILjava/lang/Object;)V :cond_2 return-void .end method .method private final declared-synchronized send(Lokio/ByteString;I)Z .locals 6 monitor-enter p0 :try_start_0 iget-boolean v0, p0, Lokhttp3/internal/ws/RealWebSocket;->failed:Z const/4 v1, 0x0 if-nez v0, :cond_2 iget-boolean v0, p0, Lokhttp3/internal/ws/RealWebSocket;->enqueuedClose:Z if-eqz v0, :cond_0 goto :goto_0 :cond_0 iget-wide v2, p0, Lokhttp3/internal/ws/RealWebSocket;->queueSize:J .line 405 invoke-virtual {p1}, Lokio/ByteString;->size()I move-result v0 int-to-long v4, v0 add-long/2addr v2, v4 const-wide/32 v4, 0x1000000 cmp-long v0, v2, v4 if-lez v0, :cond_1 const/16 p1, 0x3e9 const/4 p2, 0x0 .line 406 invoke-virtual {p0, p1, p2}, Lokhttp3/internal/ws/RealWebSocket;->close(ILjava/lang/String;)Z :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 407 monitor-exit p0 return v1 :cond_1 :try_start_1 iget-wide v0, p0, Lokhttp3/internal/ws/RealWebSocket;->queueSize:J .line 411 invoke-virtual {p1}, Lokio/ByteString;->size()I move-result v2 int-to-long v2, v2 add-long/2addr v0, v2 iput-wide v0, p0, Lokhttp3/internal/ws/RealWebSocket;->queueSize:J iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->messageAndCloseQueue:Ljava/util/ArrayDeque; .line 412 new-instance v1, Lokhttp3/internal/ws/RealWebSocket$Message; invoke-direct {v1, p2, p1}, Lokhttp3/internal/ws/RealWebSocket$Message;->(ILokio/ByteString;)V invoke-virtual {v0, v1}, Ljava/util/ArrayDeque;->add(Ljava/lang/Object;)Z .line 413 invoke-direct {p0}, Lokhttp3/internal/ws/RealWebSocket;->runWriter()V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 .line 414 monitor-exit p0 const/4 p0, 0x1 return p0 .line 402 :cond_2 :goto_0 monitor-exit p0 return v1 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method # virtual methods .method public final awaitTermination(JLjava/util/concurrent/TimeUnit;)V .locals 1 .annotation system Ldalvik/annotation/Throws; value = { Ljava/lang/InterruptedException; } .end annotation const-string v0, "timeUnit" invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-object p0, p0, Lokhttp3/internal/ws/RealWebSocket;->taskQueue:Lokhttp3/internal/concurrent/TaskQueue; .line 315 invoke-virtual {p0}, Lokhttp3/internal/concurrent/TaskQueue;->idleLatch()Ljava/util/concurrent/CountDownLatch; move-result-object p0 invoke-virtual {p0, p1, p2, p3}, Ljava/util/concurrent/CountDownLatch;->await(JLjava/util/concurrent/TimeUnit;)Z return-void .end method .method public cancel()V .locals 0 iget-object p0, p0, Lokhttp3/internal/ws/RealWebSocket;->call:Lokhttp3/Call; .line 143 invoke-static {p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-interface {p0}, Lokhttp3/Call;->cancel()V return-void .end method .method public final checkUpgradeSuccess$okhttp(Lokhttp3/Response;Lokhttp3/internal/connection/Exchange;)V .locals 7 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const-string v0, "response" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 223 invoke-virtual {p1}, Lokhttp3/Response;->code()I move-result v0 const/16 v1, 0x65 const/16 v2, 0x27 if-ne v0, v1, :cond_4 const-string v0, "Connection" const/4 v1, 0x0 const/4 v3, 0x2 .line 228 invoke-static {p1, v0, v1, v3, v1}, Lokhttp3/Response;->header$default(Lokhttp3/Response;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String; move-result-object v0 const-string v4, "Upgrade" const/4 v5, 0x1 .line 229 invoke-static {v4, v0, v5}, Lkotlin/text/StringsKt;->equals(Ljava/lang/String;Ljava/lang/String;Z)Z move-result v6 if-eqz v6, :cond_3 .line 234 invoke-static {p1, v4, v1, v3, v1}, Lokhttp3/Response;->header$default(Lokhttp3/Response;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String; move-result-object v0 const-string v4, "websocket" .line 235 invoke-static {v4, v0, v5}, Lkotlin/text/StringsKt;->equals(Ljava/lang/String;Ljava/lang/String;Z)Z move-result v4 if-eqz v4, :cond_2 const-string v0, "Sec-WebSocket-Accept" .line 240 invoke-static {p1, v0, v1, v3, v1}, Lokhttp3/Response;->header$default(Lokhttp3/Response;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String; move-result-object p1 .line 241 sget-object v0, Lokio/ByteString;->Companion:Lokio/ByteString$Companion; new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V iget-object p0, p0, Lokhttp3/internal/ws/RealWebSocket;->key:Ljava/lang/String; invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 const-string v1, "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" invoke-virtual {p0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 invoke-virtual {v0, p0}, Lokio/ByteString$Companion;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString; move-result-object p0 invoke-virtual {p0}, Lokio/ByteString;->sha1()Lokio/ByteString; move-result-object p0 invoke-virtual {p0}, Lokio/ByteString;->base64()Ljava/lang/String; move-result-object p0 .line 242 invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v0 xor-int/2addr v0, v5 if-nez v0, :cond_1 if-eqz p2, :cond_0 return-void .line 248 :cond_0 new-instance p0, Ljava/net/ProtocolException; const-string p1, "Web Socket exchange missing: bad interceptor?" invoke-direct {p0, p1}, Ljava/net/ProtocolException;->(Ljava/lang/String;)V check-cast p0, Ljava/lang/Throwable; throw p0 .line 243 :cond_1 new-instance p2, Ljava/net/ProtocolException; .line 244 new-instance v0, Ljava/lang/StringBuilder; const-string v1, "Expected \'Sec-WebSocket-Accept\' header value \'" invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 const-string v0, "\' but was \'" invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 .line 243 invoke-direct {p2, p0}, Ljava/net/ProtocolException;->(Ljava/lang/String;)V check-cast p2, Ljava/lang/Throwable; throw p2 .line 236 :cond_2 new-instance p0, Ljava/net/ProtocolException; .line 237 new-instance p1, Ljava/lang/StringBuilder; const-string p2, "Expected \'Upgrade\' header value \'websocket\' but was \'" invoke-direct {p1, p2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 .line 236 invoke-direct {p0, p1}, Ljava/net/ProtocolException;->(Ljava/lang/String;)V check-cast p0, Ljava/lang/Throwable; throw p0 .line 230 :cond_3 new-instance p0, Ljava/net/ProtocolException; .line 231 new-instance p1, Ljava/lang/StringBuilder; const-string p2, "Expected \'Connection\' header value \'Upgrade\' but was \'" invoke-direct {p1, p2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 .line 230 invoke-direct {p0, p1}, Ljava/net/ProtocolException;->(Ljava/lang/String;)V check-cast p0, Ljava/lang/Throwable; throw p0 .line 224 :cond_4 new-instance p0, Ljava/net/ProtocolException; .line 225 new-instance p2, Ljava/lang/StringBuilder; const-string v0, "Expected HTTP 101 response but was \'" invoke-direct {p2, v0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p1}, Lokhttp3/Response;->code()I move-result v0 invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object p2 const/16 v0, 0x20 invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; move-result-object p2 invoke-virtual {p1}, Lokhttp3/Response;->message()Ljava/lang/String; move-result-object p1 invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 .line 224 invoke-direct {p0, p1}, Ljava/net/ProtocolException;->(Ljava/lang/String;)V check-cast p0, Ljava/lang/Throwable; throw p0 .end method .method public close(ILjava/lang/String;)Z .locals 2 const-wide/32 v0, 0xea60 .line 427 invoke-virtual {p0, p1, p2, v0, v1}, Lokhttp3/internal/ws/RealWebSocket;->close(ILjava/lang/String;J)Z move-result p0 return p0 .end method .method public final declared-synchronized close(ILjava/lang/String;J)Z .locals 8 const-string v0, "reason.size() > 123: " monitor-enter p0 .line 435 :try_start_0 sget-object v1, Lokhttp3/internal/ws/WebSocketProtocol;->INSTANCE:Lokhttp3/internal/ws/WebSocketProtocol; invoke-virtual {v1, p1}, Lokhttp3/internal/ws/WebSocketProtocol;->validateCloseCode(I)V const/4 v1, 0x0 .line 437 move-object v2, v1 check-cast v2, Lokio/ByteString; const/4 v2, 0x0 const/4 v3, 0x1 if-eqz p2, :cond_2 .line 439 sget-object v1, Lokio/ByteString;->Companion:Lokio/ByteString$Companion; invoke-virtual {v1, p2}, Lokio/ByteString$Companion;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString; move-result-object v1 .line 440 invoke-virtual {v1}, Lokio/ByteString;->size()I move-result v4 int-to-long v4, v4 const-wide/16 v6, 0x7b cmp-long v4, v4, v6 if-gtz v4, :cond_0 move v4, v3 goto :goto_0 :cond_0 move v4, v2 :goto_0 if-eqz v4, :cond_1 goto :goto_1 .line 441 :cond_1 new-instance p1, Ljava/lang/StringBuilder; invoke-direct {p1, v0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 .line 440 new-instance p2, Ljava/lang/IllegalArgumentException; invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V check-cast p2, Ljava/lang/Throwable; throw p2 :cond_2 :goto_1 iget-boolean p2, p0, Lokhttp3/internal/ws/RealWebSocket;->failed:Z if-nez p2, :cond_4 iget-boolean p2, p0, Lokhttp3/internal/ws/RealWebSocket;->enqueuedClose:Z if-eqz p2, :cond_3 goto :goto_2 :cond_3 iput-boolean v3, p0, Lokhttp3/internal/ws/RealWebSocket;->enqueuedClose:Z iget-object p2, p0, Lokhttp3/internal/ws/RealWebSocket;->messageAndCloseQueue:Ljava/util/ArrayDeque; .line 451 new-instance v0, Lokhttp3/internal/ws/RealWebSocket$Close; invoke-direct {v0, p1, v1, p3, p4}, Lokhttp3/internal/ws/RealWebSocket$Close;->(ILokio/ByteString;J)V invoke-virtual {p2, v0}, Ljava/util/ArrayDeque;->add(Ljava/lang/Object;)Z .line 452 invoke-direct {p0}, Lokhttp3/internal/ws/RealWebSocket;->runWriter()V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 453 monitor-exit p0 return v3 .line 445 :cond_4 :goto_2 monitor-exit p0 return v2 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public final connect(Lokhttp3/OkHttpClient;)V .locals 4 const-string v0, "client" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->originalRequest:Lokhttp3/Request; const-string v1, "Sec-WebSocket-Extensions" .line 147 invoke-virtual {v0, v1}, Lokhttp3/Request;->header(Ljava/lang/String;)Ljava/lang/String; move-result-object v0 if-eqz v0, :cond_0 .line 148 new-instance p1, Ljava/net/ProtocolException; const-string v0, "Request header not permitted: \'Sec-WebSocket-Extensions\'" invoke-direct {p1, v0}, Ljava/net/ProtocolException;->(Ljava/lang/String;)V check-cast p1, Ljava/lang/Exception; const/4 v0, 0x0 invoke-virtual {p0, p1, v0}, Lokhttp3/internal/ws/RealWebSocket;->failWebSocket(Ljava/lang/Exception;Lokhttp3/Response;)V return-void .line 153 :cond_0 invoke-virtual {p1}, Lokhttp3/OkHttpClient;->newBuilder()Lokhttp3/OkHttpClient$Builder; move-result-object p1 .line 154 sget-object v0, Lokhttp3/EventListener;->NONE:Lokhttp3/EventListener; invoke-virtual {p1, v0}, Lokhttp3/OkHttpClient$Builder;->eventListener(Lokhttp3/EventListener;)Lokhttp3/OkHttpClient$Builder; move-result-object p1 sget-object v0, Lokhttp3/internal/ws/RealWebSocket;->ONLY_HTTP1:Ljava/util/List; .line 155 invoke-virtual {p1, v0}, Lokhttp3/OkHttpClient$Builder;->protocols(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder; move-result-object p1 .line 156 invoke-virtual {p1}, Lokhttp3/OkHttpClient$Builder;->build()Lokhttp3/OkHttpClient; move-result-object p1 iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->originalRequest:Lokhttp3/Request; .line 157 invoke-virtual {v0}, Lokhttp3/Request;->newBuilder()Lokhttp3/Request$Builder; move-result-object v0 const-string v2, "websocket" const-string v3, "Upgrade" .line 158 invoke-virtual {v0, v3, v2}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder; move-result-object v0 const-string v2, "Connection" .line 159 invoke-virtual {v0, v2, v3}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder; move-result-object v0 const-string v2, "Sec-WebSocket-Key" iget-object v3, p0, Lokhttp3/internal/ws/RealWebSocket;->key:Ljava/lang/String; .line 160 invoke-virtual {v0, v2, v3}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder; move-result-object v0 const-string v2, "Sec-WebSocket-Version" const-string v3, "13" .line 161 invoke-virtual {v0, v2, v3}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder; move-result-object v0 const-string v2, "permessage-deflate" .line 162 invoke-virtual {v0, v1, v2}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder; move-result-object v0 .line 163 invoke-virtual {v0}, Lokhttp3/Request$Builder;->build()Lokhttp3/Request; move-result-object v0 .line 164 new-instance v1, Lokhttp3/internal/connection/RealCall; const/4 v2, 0x1 invoke-direct {v1, p1, v0, v2}, Lokhttp3/internal/connection/RealCall;->(Lokhttp3/OkHttpClient;Lokhttp3/Request;Z)V check-cast v1, Lokhttp3/Call; iput-object v1, p0, Lokhttp3/internal/ws/RealWebSocket;->call:Lokhttp3/Call; .line 165 invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V new-instance p1, Lokhttp3/internal/ws/RealWebSocket$connect$1; invoke-direct {p1, p0, v0}, Lokhttp3/internal/ws/RealWebSocket$connect$1;->(Lokhttp3/internal/ws/RealWebSocket;Lokhttp3/Request;)V check-cast p1, Lokhttp3/Callback; invoke-interface {v1, p1}, Lokhttp3/Call;->enqueue(Lokhttp3/Callback;)V return-void .end method .method public final failWebSocket(Ljava/lang/Exception;Lokhttp3/Response;)V .locals 5 const-string v0, "e" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 579 monitor-enter p0 :try_start_0 iget-boolean v0, p0, Lokhttp3/internal/ws/RealWebSocket;->failed:Z :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_1 if-eqz v0, :cond_0 .line 580 monitor-exit p0 return-void :cond_0 const/4 v0, 0x1 :try_start_1 iput-boolean v0, p0, Lokhttp3/internal/ws/RealWebSocket;->failed:Z iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->streams:Lokhttp3/internal/ws/RealWebSocket$Streams; const/4 v1, 0x0 .line 583 move-object v2, v1 check-cast v2, Lokhttp3/internal/ws/RealWebSocket$Streams; iput-object v1, p0, Lokhttp3/internal/ws/RealWebSocket;->streams:Lokhttp3/internal/ws/RealWebSocket$Streams; iget-object v2, p0, Lokhttp3/internal/ws/RealWebSocket;->reader:Lokhttp3/internal/ws/WebSocketReader; .line 585 move-object v3, v1 check-cast v3, Lokhttp3/internal/ws/WebSocketReader; iput-object v1, p0, Lokhttp3/internal/ws/RealWebSocket;->reader:Lokhttp3/internal/ws/WebSocketReader; iget-object v3, p0, Lokhttp3/internal/ws/RealWebSocket;->writer:Lokhttp3/internal/ws/WebSocketWriter; .line 587 move-object v4, v1 check-cast v4, Lokhttp3/internal/ws/WebSocketWriter; iput-object v1, p0, Lokhttp3/internal/ws/RealWebSocket;->writer:Lokhttp3/internal/ws/WebSocketWriter; iget-object v1, p0, Lokhttp3/internal/ws/RealWebSocket;->taskQueue:Lokhttp3/internal/concurrent/TaskQueue; .line 588 invoke-virtual {v1}, Lokhttp3/internal/concurrent/TaskQueue;->shutdown()V .line 589 sget-object v1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_1 .line 579 monitor-exit p0 :try_start_2 iget-object v1, p0, Lokhttp3/internal/ws/RealWebSocket;->listener:Lokhttp3/WebSocketListener; .line 592 check-cast p0, Lokhttp3/WebSocket; check-cast p1, Ljava/lang/Throwable; invoke-virtual {v1, p0, p1, p2}, Lokhttp3/WebSocketListener;->onFailure(Lokhttp3/WebSocket;Ljava/lang/Throwable;Lokhttp3/Response;)V :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_0 if-eqz v0, :cond_1 .line 594 check-cast v0, Ljava/io/Closeable; invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_1 if-eqz v2, :cond_2 .line 595 check-cast v2, Ljava/io/Closeable; invoke-static {v2}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_2 if-eqz v3, :cond_3 .line 596 check-cast v3, Ljava/io/Closeable; invoke-static {v3}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_3 return-void :catchall_0 move-exception p0 if-eqz v0, :cond_4 .line 594 check-cast v0, Ljava/io/Closeable; invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_4 if-eqz v2, :cond_5 .line 595 check-cast v2, Ljava/io/Closeable; invoke-static {v2}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_5 if-eqz v3, :cond_6 .line 596 check-cast v3, Ljava/io/Closeable; invoke-static {v3}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_6 throw p0 :catchall_1 move-exception p1 .line 579 monitor-exit p0 throw p1 .end method .method public final getListener$okhttp()Lokhttp3/WebSocketListener; .locals 0 iget-object p0, p0, Lokhttp3/internal/ws/RealWebSocket;->listener:Lokhttp3/WebSocketListener; return-object p0 .end method .method public final initReaderAndWriter(Ljava/lang/String;Lokhttp3/internal/ws/RealWebSocket$Streams;)V .locals 17 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation move-object/from16 v10, p0 move-object/from16 v0, p1 move-object/from16 v11, p2 const-string v1, "name" invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v1, "streams" invoke-static {v11, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-object v12, v10, Lokhttp3/internal/ws/RealWebSocket;->extensions:Lokhttp3/internal/ws/WebSocketExtensions; .line 254 invoke-static {v12}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V .line 255 monitor-enter p0 :try_start_0 iput-object v0, v10, Lokhttp3/internal/ws/RealWebSocket;->name:Ljava/lang/String; iput-object v11, v10, Lokhttp3/internal/ws/RealWebSocket;->streams:Lokhttp3/internal/ws/RealWebSocket$Streams; .line 258 new-instance v9, Lokhttp3/internal/ws/WebSocketWriter; .line 259 invoke-virtual/range {p2 .. p2}, Lokhttp3/internal/ws/RealWebSocket$Streams;->getClient()Z move-result v2 .line 260 invoke-virtual/range {p2 .. p2}, Lokhttp3/internal/ws/RealWebSocket$Streams;->getSink()Lokio/BufferedSink; move-result-object v3 iget-object v4, v10, Lokhttp3/internal/ws/RealWebSocket;->random:Ljava/util/Random; .line 262 iget-boolean v5, v12, Lokhttp3/internal/ws/WebSocketExtensions;->perMessageDeflate:Z .line 263 invoke-virtual/range {p2 .. p2}, Lokhttp3/internal/ws/RealWebSocket$Streams;->getClient()Z move-result v1 invoke-virtual {v12, v1}, Lokhttp3/internal/ws/WebSocketExtensions;->noContextTakeover(Z)Z move-result v6 iget-wide v7, v10, Lokhttp3/internal/ws/RealWebSocket;->minimumDeflateSize:J move-object v1, v9 .line 258 invoke-direct/range {v1 .. v8}, Lokhttp3/internal/ws/WebSocketWriter;->(ZLokio/BufferedSink;Ljava/util/Random;ZZJ)V iput-object v9, v10, Lokhttp3/internal/ws/RealWebSocket;->writer:Lokhttp3/internal/ws/WebSocketWriter; .line 266 new-instance v1, Lokhttp3/internal/ws/RealWebSocket$WriterTask; invoke-direct {v1, v10}, Lokhttp3/internal/ws/RealWebSocket$WriterTask;->(Lokhttp3/internal/ws/RealWebSocket;)V check-cast v1, Lokhttp3/internal/concurrent/Task; iput-object v1, v10, Lokhttp3/internal/ws/RealWebSocket;->writerTask:Lokhttp3/internal/concurrent/Task; iget-wide v1, v10, Lokhttp3/internal/ws/RealWebSocket;->pingIntervalMillis:J const-wide/16 v3, 0x0 cmp-long v1, v1, v3 if-eqz v1, :cond_0 .line 268 sget-object v1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit; iget-wide v2, v10, Lokhttp3/internal/ws/RealWebSocket;->pingIntervalMillis:J invoke-virtual {v1, v2, v3}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J move-result-wide v13 iget-object v15, v10, Lokhttp3/internal/ws/RealWebSocket;->taskQueue:Lokhttp3/internal/concurrent/TaskQueue; .line 269 new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, " ping" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v3 .line 655 new-instance v16, Lokhttp3/internal/ws/RealWebSocket$initReaderAndWriter$$inlined$synchronized$lambda$1; move-object/from16 v1, v16 move-object v2, v3 move-wide v4, v13 move-object/from16 v6, p0 move-object/from16 v7, p1 move-object/from16 v8, p2 move-object v9, v12 invoke-direct/range {v1 .. v9}, Lokhttp3/internal/ws/RealWebSocket$initReaderAndWriter$$inlined$synchronized$lambda$1;->(Ljava/lang/String;Ljava/lang/String;JLokhttp3/internal/ws/RealWebSocket;Ljava/lang/String;Lokhttp3/internal/ws/RealWebSocket$Streams;Lokhttp3/internal/ws/WebSocketExtensions;)V move-object/from16 v0, v16 check-cast v0, Lokhttp3/internal/concurrent/Task; invoke-virtual {v15, v0, v13, v14}, Lokhttp3/internal/concurrent/TaskQueue;->schedule(Lokhttp3/internal/concurrent/Task;J)V :cond_0 iget-object v0, v10, Lokhttp3/internal/ws/RealWebSocket;->messageAndCloseQueue:Ljava/util/ArrayDeque; .line 274 check-cast v0, Ljava/util/Collection; invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z move-result v0 xor-int/lit8 v0, v0, 0x1 if-eqz v0, :cond_1 .line 275 invoke-direct/range {p0 .. p0}, Lokhttp3/internal/ws/RealWebSocket;->runWriter()V .line 277 :cond_1 sget-object v0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 255 monitor-exit p0 .line 279 new-instance v0, Lokhttp3/internal/ws/WebSocketReader; .line 280 invoke-virtual/range {p2 .. p2}, Lokhttp3/internal/ws/RealWebSocket$Streams;->getClient()Z move-result v2 .line 281 invoke-virtual/range {p2 .. p2}, Lokhttp3/internal/ws/RealWebSocket$Streams;->getSource()Lokio/BufferedSource; move-result-object v3 .line 282 move-object v4, v10 check-cast v4, Lokhttp3/internal/ws/WebSocketReader$FrameCallback; .line 283 iget-boolean v5, v12, Lokhttp3/internal/ws/WebSocketExtensions;->perMessageDeflate:Z .line 284 invoke-virtual/range {p2 .. p2}, Lokhttp3/internal/ws/RealWebSocket$Streams;->getClient()Z move-result v1 xor-int/lit8 v1, v1, 0x1 invoke-virtual {v12, v1}, Lokhttp3/internal/ws/WebSocketExtensions;->noContextTakeover(Z)Z move-result v6 move-object v1, v0 .line 279 invoke-direct/range {v1 .. v6}, Lokhttp3/internal/ws/WebSocketReader;->(ZLokio/BufferedSource;Lokhttp3/internal/ws/WebSocketReader$FrameCallback;ZZ)V iput-object v0, v10, Lokhttp3/internal/ws/RealWebSocket;->reader:Lokhttp3/internal/ws/WebSocketReader; return-void :catchall_0 move-exception v0 .line 255 monitor-exit p0 throw v0 .end method .method public final loopReader()V .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation :goto_0 iget v0, p0, Lokhttp3/internal/ws/RealWebSocket;->receivedCloseCode:I const/4 v1, -0x1 if-ne v0, v1, :cond_0 iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->reader:Lokhttp3/internal/ws/WebSocketReader; .line 293 invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-virtual {v0}, Lokhttp3/internal/ws/WebSocketReader;->processNextFrame()V goto :goto_0 :cond_0 return-void .end method .method public onReadClose(ILjava/lang/String;)V .locals 5 const-string v0, "reason" invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const/4 v0, 0x1 const/4 v1, 0x0 const/4 v2, -0x1 if-eq p1, v2, :cond_0 move v3, v0 goto :goto_0 :cond_0 move v3, v1 :goto_0 if-eqz v3, :cond_b const/4 v3, 0x0 .line 359 move-object v4, v3 check-cast v4, Lokhttp3/internal/ws/RealWebSocket$Streams; .line 360 move-object v4, v3 check-cast v4, Lokhttp3/internal/ws/WebSocketReader; .line 361 move-object v4, v3 check-cast v4, Lokhttp3/internal/ws/WebSocketWriter; .line 362 monitor-enter p0 :try_start_0 iget v4, p0, Lokhttp3/internal/ws/RealWebSocket;->receivedCloseCode:I if-ne v4, v2, :cond_1 goto :goto_1 :cond_1 move v0, v1 :goto_1 if-eqz v0, :cond_a iput p1, p0, Lokhttp3/internal/ws/RealWebSocket;->receivedCloseCode:I iput-object p2, p0, Lokhttp3/internal/ws/RealWebSocket;->receivedCloseReason:Ljava/lang/String; iget-boolean v0, p0, Lokhttp3/internal/ws/RealWebSocket;->enqueuedClose:Z if-eqz v0, :cond_2 iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->messageAndCloseQueue:Ljava/util/ArrayDeque; .line 366 invoke-virtual {v0}, Ljava/util/ArrayDeque;->isEmpty()Z move-result v0 if-eqz v0, :cond_2 iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->streams:Lokhttp3/internal/ws/RealWebSocket$Streams; .line 368 move-object v1, v3 check-cast v1, Lokhttp3/internal/ws/RealWebSocket$Streams; iput-object v3, p0, Lokhttp3/internal/ws/RealWebSocket;->streams:Lokhttp3/internal/ws/RealWebSocket$Streams; iget-object v1, p0, Lokhttp3/internal/ws/RealWebSocket;->reader:Lokhttp3/internal/ws/WebSocketReader; .line 370 move-object v2, v3 check-cast v2, Lokhttp3/internal/ws/WebSocketReader; iput-object v3, p0, Lokhttp3/internal/ws/RealWebSocket;->reader:Lokhttp3/internal/ws/WebSocketReader; iget-object v2, p0, Lokhttp3/internal/ws/RealWebSocket;->writer:Lokhttp3/internal/ws/WebSocketWriter; .line 372 move-object v4, v3 check-cast v4, Lokhttp3/internal/ws/WebSocketWriter; iput-object v3, p0, Lokhttp3/internal/ws/RealWebSocket;->writer:Lokhttp3/internal/ws/WebSocketWriter; iget-object v3, p0, Lokhttp3/internal/ws/RealWebSocket;->taskQueue:Lokhttp3/internal/concurrent/TaskQueue; .line 373 invoke-virtual {v3}, Lokhttp3/internal/concurrent/TaskQueue;->shutdown()V move-object v3, v0 goto :goto_2 :cond_2 move-object v1, v3 move-object v2, v1 .line 375 :goto_2 sget-object v0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_1 .line 362 monitor-exit p0 :try_start_1 iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->listener:Lokhttp3/WebSocketListener; .line 378 move-object v4, p0 check-cast v4, Lokhttp3/WebSocket; invoke-virtual {v0, v4, p1, p2}, Lokhttp3/WebSocketListener;->onClosing(Lokhttp3/WebSocket;ILjava/lang/String;)V if-eqz v3, :cond_3 iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->listener:Lokhttp3/WebSocketListener; .line 381 check-cast p0, Lokhttp3/WebSocket; invoke-virtual {v0, p0, p1, p2}, Lokhttp3/WebSocketListener;->onClosed(Lokhttp3/WebSocket;ILjava/lang/String;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 :cond_3 if-eqz v3, :cond_4 .line 384 check-cast v3, Ljava/io/Closeable; invoke-static {v3}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_4 if-eqz v1, :cond_5 .line 385 check-cast v1, Ljava/io/Closeable; invoke-static {v1}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_5 if-eqz v2, :cond_6 .line 386 check-cast v2, Ljava/io/Closeable; invoke-static {v2}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_6 return-void :catchall_0 move-exception p0 if-eqz v3, :cond_7 .line 384 check-cast v3, Ljava/io/Closeable; invoke-static {v3}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_7 if-eqz v1, :cond_8 .line 385 check-cast v1, Ljava/io/Closeable; invoke-static {v1}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_8 if-eqz v2, :cond_9 .line 386 check-cast v2, Ljava/io/Closeable; invoke-static {v2}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_9 throw p0 :cond_a :try_start_2 const-string p1, "already closed" .line 363 new-instance p2, Ljava/lang/IllegalStateException; invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {p2, p1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V check-cast p2, Ljava/lang/Throwable; throw p2 :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_1 :catchall_1 move-exception p1 .line 362 monitor-exit p0 throw p1 :cond_b const-string p0, "Failed requirement." .line 357 new-instance p1, Ljava/lang/IllegalArgumentException; invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object p0 invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V check-cast p1, Ljava/lang/Throwable; throw p1 .end method .method public onReadMessage(Ljava/lang/String;)V .locals 1 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const-string v0, "text" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->listener:Lokhttp3/WebSocketListener; .line 333 check-cast p0, Lokhttp3/WebSocket; invoke-virtual {v0, p0, p1}, Lokhttp3/WebSocketListener;->onMessage(Lokhttp3/WebSocket;Ljava/lang/String;)V return-void .end method .method public onReadMessage(Lokio/ByteString;)V .locals 1 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const-string v0, "bytes" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->listener:Lokhttp3/WebSocketListener; .line 338 check-cast p0, Lokhttp3/WebSocket; invoke-virtual {v0, p0, p1}, Lokhttp3/WebSocketListener;->onMessage(Lokhttp3/WebSocket;Lokio/ByteString;)V return-void .end method .method public declared-synchronized onReadPing(Lokio/ByteString;)V .locals 1 monitor-enter p0 :try_start_0 const-string v0, "payload" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-boolean v0, p0, Lokhttp3/internal/ws/RealWebSocket;->failed:Z if-nez v0, :cond_1 iget-boolean v0, p0, Lokhttp3/internal/ws/RealWebSocket;->enqueuedClose:Z if-eqz v0, :cond_0 iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->messageAndCloseQueue:Ljava/util/ArrayDeque; .line 343 invoke-virtual {v0}, Ljava/util/ArrayDeque;->isEmpty()Z move-result v0 if-eqz v0, :cond_0 goto :goto_0 :cond_0 iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->pongQueue:Ljava/util/ArrayDeque; .line 345 invoke-virtual {v0, p1}, Ljava/util/ArrayDeque;->add(Ljava/lang/Object;)Z .line 346 invoke-direct {p0}, Lokhttp3/internal/ws/RealWebSocket;->runWriter()V iget p1, p0, Lokhttp3/internal/ws/RealWebSocket;->receivedPingCount:I add-int/lit8 p1, p1, 0x1 iput p1, p0, Lokhttp3/internal/ws/RealWebSocket;->receivedPingCount:I :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 348 monitor-exit p0 return-void .line 343 :cond_1 :goto_0 monitor-exit p0 return-void :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public declared-synchronized onReadPong(Lokio/ByteString;)V .locals 1 monitor-enter p0 :try_start_0 const-string v0, "payload" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget p1, p0, Lokhttp3/internal/ws/RealWebSocket;->receivedPongCount:I add-int/lit8 p1, p1, 0x1 iput p1, p0, Lokhttp3/internal/ws/RealWebSocket;->receivedPongCount:I const/4 p1, 0x0 iput-boolean p1, p0, Lokhttp3/internal/ws/RealWebSocket;->awaitingPong:Z :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 354 monitor-exit p0 return-void :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public final declared-synchronized pong(Lokio/ByteString;)Z .locals 1 monitor-enter p0 :try_start_0 const-string v0, "payload" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-boolean v0, p0, Lokhttp3/internal/ws/RealWebSocket;->failed:Z if-nez v0, :cond_1 iget-boolean v0, p0, Lokhttp3/internal/ws/RealWebSocket;->enqueuedClose:Z if-eqz v0, :cond_0 iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->messageAndCloseQueue:Ljava/util/ArrayDeque; .line 419 invoke-virtual {v0}, Ljava/util/ArrayDeque;->isEmpty()Z move-result v0 if-eqz v0, :cond_0 goto :goto_0 :cond_0 iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->pongQueue:Ljava/util/ArrayDeque; .line 421 invoke-virtual {v0, p1}, Ljava/util/ArrayDeque;->add(Ljava/lang/Object;)Z .line 422 invoke-direct {p0}, Lokhttp3/internal/ws/RealWebSocket;->runWriter()V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 423 monitor-exit p0 const/4 p0, 0x1 return p0 .line 419 :cond_1 :goto_0 monitor-exit p0 const/4 p0, 0x0 return p0 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public final processNextFrame()Z .locals 3 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const/4 v0, 0x0 :try_start_0 iget-object v1, p0, Lokhttp3/internal/ws/RealWebSocket;->reader:Lokhttp3/internal/ws/WebSocketReader; .line 304 invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-virtual {v1}, Lokhttp3/internal/ws/WebSocketReader;->processNextFrame()V iget p0, p0, Lokhttp3/internal/ws/RealWebSocket;->receivedCloseCode:I :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 const/4 v1, -0x1 if-ne p0, v1, :cond_0 const/4 p0, 0x1 move v0, p0 goto :goto_0 :catch_0 move-exception v1 const/4 v2, 0x0 .line 307 invoke-virtual {p0, v1, v2}, Lokhttp3/internal/ws/RealWebSocket;->failWebSocket(Ljava/lang/Exception;Lokhttp3/Response;)V :cond_0 :goto_0 return v0 .end method .method public declared-synchronized queueSize()J .locals 2 monitor-enter p0 :try_start_0 iget-wide v0, p0, Lokhttp3/internal/ws/RealWebSocket;->queueSize:J :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 140 monitor-exit p0 return-wide v0 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method public final declared-synchronized receivedPingCount()I .locals 1 monitor-enter p0 :try_start_0 iget v0, p0, Lokhttp3/internal/ws/RealWebSocket;->receivedPingCount:I :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 327 monitor-exit p0 return v0 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method public final declared-synchronized receivedPongCount()I .locals 1 monitor-enter p0 :try_start_0 iget v0, p0, Lokhttp3/internal/ws/RealWebSocket;->receivedPongCount:I :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 329 monitor-exit p0 return v0 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method public request()Lokhttp3/Request; .locals 0 iget-object p0, p0, Lokhttp3/internal/ws/RealWebSocket;->originalRequest:Lokhttp3/Request; return-object p0 .end method .method public send(Ljava/lang/String;)Z .locals 1 const-string v0, "text" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 393 sget-object v0, Lokio/ByteString;->Companion:Lokio/ByteString$Companion; invoke-virtual {v0, p1}, Lokio/ByteString$Companion;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString; move-result-object p1 const/4 v0, 0x1 invoke-direct {p0, p1, v0}, Lokhttp3/internal/ws/RealWebSocket;->send(Lokio/ByteString;I)Z move-result p0 return p0 .end method .method public send(Lokio/ByteString;)Z .locals 1 const-string v0, "bytes" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const/4 v0, 0x2 .line 397 invoke-direct {p0, p1, v0}, Lokhttp3/internal/ws/RealWebSocket;->send(Lokio/ByteString;I)Z move-result p0 return p0 .end method .method public final declared-synchronized sentPingCount()I .locals 1 monitor-enter p0 :try_start_0 iget v0, p0, Lokhttp3/internal/ws/RealWebSocket;->sentPingCount:I :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 325 monitor-exit p0 return v0 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method public final tearDown()V .locals 3 .annotation system Ldalvik/annotation/Throws; value = { Ljava/lang/InterruptedException; } .end annotation iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->taskQueue:Lokhttp3/internal/concurrent/TaskQueue; .line 321 invoke-virtual {v0}, Lokhttp3/internal/concurrent/TaskQueue;->shutdown()V iget-object p0, p0, Lokhttp3/internal/ws/RealWebSocket;->taskQueue:Lokhttp3/internal/concurrent/TaskQueue; .line 322 invoke-virtual {p0}, Lokhttp3/internal/concurrent/TaskQueue;->idleLatch()Ljava/util/concurrent/CountDownLatch; move-result-object p0 const-wide/16 v0, 0xa sget-object v2, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit; invoke-virtual {p0, v0, v1, v2}, Ljava/util/concurrent/CountDownLatch;->await(JLjava/util/concurrent/TimeUnit;)Z return-void .end method .method public final writeOneFrame$okhttp()Z .locals 27 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation move-object/from16 v15, p0 .line 482 new-instance v0, Lkotlin/jvm/internal/Ref$ObjectRef; invoke-direct {v0}, Lkotlin/jvm/internal/Ref$ObjectRef;->()V const/4 v1, 0x0 iput-object v1, v0, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; .line 483 new-instance v14, Lkotlin/jvm/internal/Ref$IntRef; invoke-direct {v14}, Lkotlin/jvm/internal/Ref$IntRef;->()V const/4 v2, -0x1 iput v2, v14, Lkotlin/jvm/internal/Ref$IntRef;->element:I .line 484 new-instance v13, Lkotlin/jvm/internal/Ref$ObjectRef; invoke-direct {v13}, Lkotlin/jvm/internal/Ref$ObjectRef;->()V move-object v3, v1 check-cast v3, Ljava/lang/String; iput-object v1, v13, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; .line 485 new-instance v12, Lkotlin/jvm/internal/Ref$ObjectRef; invoke-direct {v12}, Lkotlin/jvm/internal/Ref$ObjectRef;->()V move-object v3, v1 check-cast v3, Lokhttp3/internal/ws/RealWebSocket$Streams; iput-object v1, v12, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; .line 486 new-instance v11, Lkotlin/jvm/internal/Ref$ObjectRef; invoke-direct {v11}, Lkotlin/jvm/internal/Ref$ObjectRef;->()V move-object v3, v1 check-cast v3, Lokhttp3/internal/ws/WebSocketReader; iput-object v1, v11, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; .line 487 new-instance v10, Lkotlin/jvm/internal/Ref$ObjectRef; invoke-direct {v10}, Lkotlin/jvm/internal/Ref$ObjectRef;->()V move-object v3, v1 check-cast v3, Lokhttp3/internal/ws/WebSocketWriter; iput-object v1, v10, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; .line 489 monitor-enter p0 :try_start_0 iget-boolean v3, v15, Lokhttp3/internal/ws/RealWebSocket;->failed:Z :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_4 const/4 v4, 0x0 if-eqz v3, :cond_0 .line 491 monitor-exit p0 return v4 :cond_0 :try_start_1 iget-object v9, v15, Lokhttp3/internal/ws/RealWebSocket;->writer:Lokhttp3/internal/ws/WebSocketWriter; iget-object v3, v15, Lokhttp3/internal/ws/RealWebSocket;->pongQueue:Ljava/util/ArrayDeque; .line 495 invoke-virtual {v3}, Ljava/util/ArrayDeque;->poll()Ljava/lang/Object; move-result-object v3 move-object v8, v3 check-cast v8, Lokio/ByteString; if-nez v8, :cond_4 iget-object v3, v15, Lokhttp3/internal/ws/RealWebSocket;->messageAndCloseQueue:Ljava/util/ArrayDeque; .line 497 invoke-virtual {v3}, Ljava/util/ArrayDeque;->poll()Ljava/lang/Object; move-result-object v3 iput-object v3, v0, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; .line 498 iget-object v3, v0, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; instance-of v3, v3, Lokhttp3/internal/ws/RealWebSocket$Close; if-eqz v3, :cond_3 iget v3, v15, Lokhttp3/internal/ws/RealWebSocket;->receivedCloseCode:I .line 499 iput v3, v14, Lkotlin/jvm/internal/Ref$IntRef;->element:I iget-object v3, v15, Lokhttp3/internal/ws/RealWebSocket;->receivedCloseReason:Ljava/lang/String; .line 500 iput-object v3, v13, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; .line 501 iget v3, v14, Lkotlin/jvm/internal/Ref$IntRef;->element:I if-eq v3, v2, :cond_1 iget-object v2, v15, Lokhttp3/internal/ws/RealWebSocket;->streams:Lokhttp3/internal/ws/RealWebSocket$Streams; .line 502 iput-object v2, v12, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; .line 503 move-object v2, v1 check-cast v2, Lokhttp3/internal/ws/RealWebSocket$Streams; iput-object v1, v15, Lokhttp3/internal/ws/RealWebSocket;->streams:Lokhttp3/internal/ws/RealWebSocket$Streams; iget-object v2, v15, Lokhttp3/internal/ws/RealWebSocket;->reader:Lokhttp3/internal/ws/WebSocketReader; .line 504 iput-object v2, v11, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; .line 505 move-object v2, v1 check-cast v2, Lokhttp3/internal/ws/WebSocketReader; iput-object v1, v15, Lokhttp3/internal/ws/RealWebSocket;->reader:Lokhttp3/internal/ws/WebSocketReader; iget-object v2, v15, Lokhttp3/internal/ws/RealWebSocket;->writer:Lokhttp3/internal/ws/WebSocketWriter; .line 506 iput-object v2, v10, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; .line 507 move-object v2, v1 check-cast v2, Lokhttp3/internal/ws/WebSocketWriter; iput-object v1, v15, Lokhttp3/internal/ws/RealWebSocket;->writer:Lokhttp3/internal/ws/WebSocketWriter; iget-object v1, v15, Lokhttp3/internal/ws/RealWebSocket;->taskQueue:Lokhttp3/internal/concurrent/TaskQueue; .line 508 invoke-virtual {v1}, Lokhttp3/internal/concurrent/TaskQueue;->shutdown()V goto/16 :goto_0 .line 511 :cond_1 iget-object v1, v0, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; if-eqz v1, :cond_2 check-cast v1, Lokhttp3/internal/ws/RealWebSocket$Close; invoke-virtual {v1}, Lokhttp3/internal/ws/RealWebSocket$Close;->getCancelAfterCloseMillis()J move-result-wide v1 iget-object v7, v15, Lokhttp3/internal/ws/RealWebSocket;->taskQueue:Lokhttp3/internal/concurrent/TaskQueue; .line 512 new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;->()V iget-object v4, v15, Lokhttp3/internal/ws/RealWebSocket;->name:Ljava/lang/String; invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 const-string v4, " cancel" invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v4 sget-object v3, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit; invoke-virtual {v3, v1, v2}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J move-result-wide v5 const/16 v16, 0x1 .line 667 new-instance v17, Lokhttp3/internal/ws/RealWebSocket$writeOneFrame$$inlined$synchronized$lambda$1; move-object/from16 v1, v17 move-object v2, v4 move/from16 v3, v16 move-wide/from16 v18, v5 move/from16 v5, v16 move-object/from16 v6, p0 move-object/from16 v20, v7 move-object v7, v9 move-object/from16 v16, v8 move-object/from16 v21, v9 move-object v9, v0 move-object/from16 v22, v10 move-object v10, v14 move-object/from16 v23, v11 move-object v11, v13 move-object/from16 v24, v12 move-object/from16 v25, v13 move-object/from16 v13, v23 move-object/from16 v26, v14 move-object/from16 v14, v22 invoke-direct/range {v1 .. v14}, Lokhttp3/internal/ws/RealWebSocket$writeOneFrame$$inlined$synchronized$lambda$1;->(Ljava/lang/String;ZLjava/lang/String;ZLokhttp3/internal/ws/RealWebSocket;Lokhttp3/internal/ws/WebSocketWriter;Lokio/ByteString;Lkotlin/jvm/internal/Ref$ObjectRef;Lkotlin/jvm/internal/Ref$IntRef;Lkotlin/jvm/internal/Ref$ObjectRef;Lkotlin/jvm/internal/Ref$ObjectRef;Lkotlin/jvm/internal/Ref$ObjectRef;Lkotlin/jvm/internal/Ref$ObjectRef;)V move-object/from16 v1, v17 check-cast v1, Lokhttp3/internal/concurrent/Task; move-wide/from16 v3, v18 move-object/from16 v2, v20 invoke-virtual {v2, v1, v3, v4}, Lokhttp3/internal/concurrent/TaskQueue;->schedule(Lokhttp3/internal/concurrent/Task;J)V goto :goto_1 .line 511 :cond_2 new-instance v0, Ljava/lang/NullPointerException; const-string v1, "null cannot be cast to non-null type okhttp3.internal.ws.RealWebSocket.Close" invoke-direct {v0, v1}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw v0 :cond_3 move-object/from16 v16, v8 move-object/from16 v21, v9 move-object/from16 v22, v10 move-object/from16 v23, v11 move-object/from16 v24, v12 move-object/from16 v25, v13 move-object/from16 v26, v14 .line 516 iget-object v1, v0, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_4 if-nez v1, :cond_5 .line 517 monitor-exit p0 return v4 :cond_4 :goto_0 move-object/from16 v16, v8 move-object/from16 v21, v9 move-object/from16 v22, v10 move-object/from16 v23, v11 move-object/from16 v24, v12 move-object/from16 v25, v13 move-object/from16 v26, v14 .line 520 :cond_5 :goto_1 :try_start_2 sget-object v1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_4 .line 489 monitor-exit p0 move-object/from16 v3, v16 if-eqz v3, :cond_6 .line 524 :try_start_3 invoke-static/range {v21 .. v21}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V move-object/from16 v1, v21 invoke-virtual {v1, v3}, Lokhttp3/internal/ws/WebSocketWriter;->writePong(Lokio/ByteString;)V :goto_2 move-object/from16 v1, v24 goto :goto_3 :cond_6 move-object/from16 v1, v21 .line 525 iget-object v2, v0, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; instance-of v2, v2, Lokhttp3/internal/ws/RealWebSocket$Message; if-eqz v2, :cond_8 .line 526 iget-object v0, v0, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; if-eqz v0, :cond_7 check-cast v0, Lokhttp3/internal/ws/RealWebSocket$Message; .line 527 invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-virtual {v0}, Lokhttp3/internal/ws/RealWebSocket$Message;->getFormatOpcode()I move-result v2 invoke-virtual {v0}, Lokhttp3/internal/ws/RealWebSocket$Message;->getData()Lokio/ByteString; move-result-object v3 invoke-virtual {v1, v2, v3}, Lokhttp3/internal/ws/WebSocketWriter;->writeMessageFrame(ILokio/ByteString;)V .line 528 monitor-enter p0 :try_end_3 .catchall {:try_start_3 .. :try_end_3} :catchall_3 :try_start_4 iget-wide v1, v15, Lokhttp3/internal/ws/RealWebSocket;->queueSize:J .line 529 invoke-virtual {v0}, Lokhttp3/internal/ws/RealWebSocket$Message;->getData()Lokio/ByteString; move-result-object v0 invoke-virtual {v0}, Lokio/ByteString;->size()I move-result v0 int-to-long v3, v0 sub-long/2addr v1, v3 iput-wide v1, v15, Lokhttp3/internal/ws/RealWebSocket;->queueSize:J .line 530 sget-object v0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; :try_end_4 .catchall {:try_start_4 .. :try_end_4} :catchall_0 .line 528 :try_start_5 monitor-exit p0 goto :goto_2 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .line 526 :cond_7 new-instance v0, Ljava/lang/NullPointerException; const-string v1, "null cannot be cast to non-null type okhttp3.internal.ws.RealWebSocket.Message" invoke-direct {v0, v1}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw v0 .line 531 :cond_8 iget-object v2, v0, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; instance-of v2, v2, Lokhttp3/internal/ws/RealWebSocket$Close; if-eqz v2, :cond_e .line 532 iget-object v0, v0, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; if-eqz v0, :cond_d check-cast v0, Lokhttp3/internal/ws/RealWebSocket$Close; .line 533 invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-virtual {v0}, Lokhttp3/internal/ws/RealWebSocket$Close;->getCode()I move-result v2 invoke-virtual {v0}, Lokhttp3/internal/ws/RealWebSocket$Close;->getReason()Lokio/ByteString; move-result-object v0 invoke-virtual {v1, v2, v0}, Lokhttp3/internal/ws/WebSocketWriter;->writeClose(ILokio/ByteString;)V :try_end_5 .catchall {:try_start_5 .. :try_end_5} :catchall_3 move-object/from16 v1, v24 .line 536 :try_start_6 iget-object v0, v1, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; check-cast v0, Lokhttp3/internal/ws/RealWebSocket$Streams; if-eqz v0, :cond_9 iget-object v0, v15, Lokhttp3/internal/ws/RealWebSocket;->listener:Lokhttp3/WebSocketListener; .line 537 move-object v2, v15 check-cast v2, Lokhttp3/WebSocket; move-object/from16 v3, v26 iget v3, v3, Lkotlin/jvm/internal/Ref$IntRef;->element:I move-object/from16 v4, v25 iget-object v4, v4, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; check-cast v4, Ljava/lang/String; invoke-static {v4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-virtual {v0, v2, v3, v4}, Lokhttp3/WebSocketListener;->onClosed(Lokhttp3/WebSocket;ILjava/lang/String;)V :try_end_6 .catchall {:try_start_6 .. :try_end_6} :catchall_1 .line 545 :cond_9 :goto_3 iget-object v0, v1, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; check-cast v0, Lokhttp3/internal/ws/RealWebSocket$Streams; if-eqz v0, :cond_a check-cast v0, Ljava/io/Closeable; invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_a move-object/from16 v2, v23 .line 546 iget-object v0, v2, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; check-cast v0, Lokhttp3/internal/ws/WebSocketReader; if-eqz v0, :cond_b check-cast v0, Ljava/io/Closeable; invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_b move-object/from16 v3, v22 .line 547 iget-object v0, v3, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; check-cast v0, Lokhttp3/internal/ws/WebSocketWriter; if-eqz v0, :cond_c check-cast v0, Ljava/io/Closeable; invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_c const/4 v0, 0x1 return v0 :catchall_1 move-exception v0 move-object/from16 v3, v22 move-object/from16 v2, v23 goto :goto_4 :cond_d move-object/from16 v3, v22 move-object/from16 v2, v23 move-object/from16 v1, v24 .line 532 :try_start_7 new-instance v0, Ljava/lang/NullPointerException; const-string v4, "null cannot be cast to non-null type okhttp3.internal.ws.RealWebSocket.Close" invoke-direct {v0, v4}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw v0 :cond_e move-object/from16 v3, v22 move-object/from16 v2, v23 move-object/from16 v1, v24 .line 540 new-instance v0, Ljava/lang/AssertionError; invoke-direct {v0}, Ljava/lang/AssertionError;->()V check-cast v0, Ljava/lang/Throwable; throw v0 :try_end_7 .catchall {:try_start_7 .. :try_end_7} :catchall_2 :catchall_2 move-exception v0 goto :goto_4 :catchall_3 move-exception v0 move-object/from16 v3, v22 move-object/from16 v2, v23 move-object/from16 v1, v24 .line 545 :goto_4 iget-object v1, v1, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; check-cast v1, Lokhttp3/internal/ws/RealWebSocket$Streams; if-eqz v1, :cond_f check-cast v1, Ljava/io/Closeable; invoke-static {v1}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V .line 546 :cond_f iget-object v1, v2, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; check-cast v1, Lokhttp3/internal/ws/WebSocketReader; if-eqz v1, :cond_10 check-cast v1, Ljava/io/Closeable; invoke-static {v1}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V .line 547 :cond_10 iget-object v1, v3, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object; check-cast v1, Lokhttp3/internal/ws/WebSocketWriter; if-eqz v1, :cond_11 check-cast v1, Ljava/io/Closeable; invoke-static {v1}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :cond_11 throw v0 :catchall_4 move-exception v0 .line 489 monitor-exit p0 throw v0 .end method .method public final writePingFrame$okhttp()V .locals 7 .line 554 monitor-enter p0 :try_start_0 iget-boolean v0, p0, Lokhttp3/internal/ws/RealWebSocket;->failed:Z :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 if-eqz v0, :cond_0 .line 555 monitor-exit p0 return-void :cond_0 :try_start_1 iget-object v0, p0, Lokhttp3/internal/ws/RealWebSocket;->writer:Lokhttp3/internal/ws/WebSocketWriter; if-eqz v0, :cond_3 iget-boolean v1, p0, Lokhttp3/internal/ws/RealWebSocket;->awaitingPong:Z const/4 v2, -0x1 if-eqz v1, :cond_1 iget v1, p0, Lokhttp3/internal/ws/RealWebSocket;->sentPingCount:I goto :goto_0 :cond_1 move v1, v2 :goto_0 iget v3, p0, Lokhttp3/internal/ws/RealWebSocket;->sentPingCount:I const/4 v4, 0x1 add-int/2addr v3, v4 iput v3, p0, Lokhttp3/internal/ws/RealWebSocket;->sentPingCount:I iput-boolean v4, p0, Lokhttp3/internal/ws/RealWebSocket;->awaitingPong:Z .line 560 sget-object v3, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 .line 554 monitor-exit p0 const/4 v3, 0x0 if-eq v1, v2, :cond_2 .line 563 new-instance v0, Ljava/net/SocketTimeoutException; new-instance v2, Ljava/lang/StringBuilder; const-string v5, "sent ping but didn\'t receive pong within " invoke-direct {v2, v5}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V iget-wide v5, p0, Lokhttp3/internal/ws/RealWebSocket;->pingIntervalMillis:J .line 564 invoke-virtual {v2, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; move-result-object v2 const-string v5, "ms (after " invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 sub-int/2addr v1, v4 invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, " successful ping/pongs)" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 .line 563 invoke-direct {v0, v1}, Ljava/net/SocketTimeoutException;->(Ljava/lang/String;)V check-cast v0, Ljava/lang/Exception; invoke-virtual {p0, v0, v3}, Lokhttp3/internal/ws/RealWebSocket;->failWebSocket(Ljava/lang/Exception;Lokhttp3/Response;)V return-void .line 569 :cond_2 :try_start_2 sget-object v1, Lokio/ByteString;->EMPTY:Lokio/ByteString; invoke-virtual {v0, v1}, Lokhttp3/internal/ws/WebSocketWriter;->writePing(Lokio/ByteString;)V :try_end_2 .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0 goto :goto_1 :catch_0 move-exception v0 .line 571 check-cast v0, Ljava/lang/Exception; invoke-virtual {p0, v0, v3}, Lokhttp3/internal/ws/RealWebSocket;->failWebSocket(Ljava/lang/Exception;Lokhttp3/Response;)V :goto_1 return-void .line 556 :cond_3 monitor-exit p0 return-void :catchall_0 move-exception v0 .line 554 monitor-exit p0 throw v0 .end method