Skip to content

Commit 37f5924

Browse files
committed
apiDump
1 parent d1f862e commit 37f5924

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

Diff for: mockwebserver-deprecated/api/mockwebserver.api

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public final class okhttp3/mockwebserver/MockWebServer : org/junit/rules/Externa
6969
public final fun -deprecated_protocols ()Ljava/util/List;
7070
public final fun -deprecated_protocols (Ljava/util/List;)V
7171
public final fun -deprecated_requestCount ()I
72-
public final fun -deprecated_serverSocketFactory (Ljavax/net/ServerSocketFactory;)V
72+
public final fun -deprecated_serverSocketFactory (Lokhttp3/internal/socket/OkioServerSocketFactory;)V
7373
public fun <init> ()V
7474
public fun close ()V
7575
public final fun enqueue (Lokhttp3/mockwebserver/MockResponse;)V
@@ -80,7 +80,7 @@ public final class okhttp3/mockwebserver/MockWebServer : org/junit/rules/Externa
8080
public final fun getPort ()I
8181
public final fun getProtocolNegotiationEnabled ()Z
8282
public final fun getRequestCount ()I
83-
public final fun getServerSocketFactory ()Ljavax/net/ServerSocketFactory;
83+
public final fun getServerSocketFactory ()Lokhttp3/internal/socket/OkioServerSocketFactory;
8484
public final fun noClientAuth ()V
8585
public final fun protocols ()Ljava/util/List;
8686
public final fun requestClientAuth ()V
@@ -89,7 +89,7 @@ public final class okhttp3/mockwebserver/MockWebServer : org/junit/rules/Externa
8989
public final fun setDispatcher (Lokhttp3/mockwebserver/Dispatcher;)V
9090
public final fun setProtocolNegotiationEnabled (Z)V
9191
public final fun setProtocols (Ljava/util/List;)V
92-
public final fun setServerSocketFactory (Ljavax/net/ServerSocketFactory;)V
92+
public final fun setServerSocketFactory (Lokhttp3/internal/socket/OkioServerSocketFactory;)V
9393
public final fun shutdown ()V
9494
public final fun start ()V
9595
public final fun start (I)V

Diff for: mockwebserver/api/mockwebserver3.api

+4-4
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public final class mockwebserver3/MockWebServer : java/io/Closeable {
107107
public final fun getProtocolNegotiationEnabled ()Z
108108
public final fun getProtocols ()Ljava/util/List;
109109
public final fun getRequestCount ()I
110-
public final fun getServerSocketFactory ()Ljavax/net/ServerSocketFactory;
110+
public final fun getServerSocketFactory ()Lokhttp3/internal/socket/OkioServerSocketFactory;
111111
public final fun getStarted ()Z
112112
public final fun noClientAuth ()V
113113
public final fun requestClientAuth ()V
@@ -116,7 +116,7 @@ public final class mockwebserver3/MockWebServer : java/io/Closeable {
116116
public final fun setDispatcher (Lmockwebserver3/Dispatcher;)V
117117
public final fun setProtocolNegotiationEnabled (Z)V
118118
public final fun setProtocols (Ljava/util/List;)V
119-
public final fun setServerSocketFactory (Ljavax/net/ServerSocketFactory;)V
119+
public final fun setServerSocketFactory (Lokhttp3/internal/socket/OkioServerSocketFactory;)V
120120
public final fun setStarted (Z)V
121121
public final fun shutdown ()V
122122
public final fun start ()V
@@ -159,8 +159,8 @@ public final class mockwebserver3/QueueDispatcher$Companion {
159159
}
160160

161161
public final class mockwebserver3/RecordedRequest {
162-
public fun <init> (Ljava/lang/String;Lokhttp3/Headers;Ljava/util/List;JLokio/Buffer;ILjava/net/Socket;Ljava/io/IOException;)V
163-
public synthetic fun <init> (Ljava/lang/String;Lokhttp3/Headers;Ljava/util/List;JLokio/Buffer;ILjava/net/Socket;Ljava/io/IOException;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
162+
public fun <init> (Ljava/lang/String;Lokhttp3/Headers;Ljava/util/List;JLokio/Buffer;ILokhttp3/internal/socket/OkioSocket;Ljava/io/IOException;)V
163+
public synthetic fun <init> (Ljava/lang/String;Lokhttp3/Headers;Ljava/util/List;JLokio/Buffer;ILokhttp3/internal/socket/OkioSocket;Ljava/io/IOException;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
164164
public final fun getBody ()Lokio/Buffer;
165165
public final fun getBodySize ()J
166166
public final fun getChunkSizes ()Ljava/util/List;

Diff for: okhttp/api/okhttp.api

+1
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ public final class okhttp3/ConnectionSpec {
409409
public fun equals (Ljava/lang/Object;)Z
410410
public fun hashCode ()I
411411
public final fun isCompatible (Ljavax/net/ssl/SSLSocket;)Z
412+
public final fun isCompatible (Lokhttp3/internal/socket/OkioSslSocket;)Z
412413
public final fun isTls ()Z
413414
public final fun supportsTlsExtensions ()Z
414415
public final fun tlsVersions ()Ljava/util/List;

Diff for: okhttp/src/main/kotlin/okhttp3/ConnectionSpec.kt

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2014 Square, Inc.
2+
* Copyright (C) 2024 Square, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -168,10 +168,22 @@ class ConnectionSpec internal constructor(
168168
* For protocols, at least one of the [required protocols][tlsVersions] must match the socket's
169169
* enabled protocols.
170170
*/
171+
@ExperimentalOkHttpApi
171172
fun isCompatible(socket: OkioSslSocket): Boolean {
172173
return isCompatible((socket as RealOkioSslSocket).delegate)
173174
}
174175

176+
/**
177+
* Returns `true` if the socket, as currently configured, supports this connection spec. In
178+
* order for a socket to be compatible the enabled cipher suites and protocols must intersect.
179+
*
180+
* For cipher suites, at least one of the [required cipher suites][cipherSuites] must match the
181+
* socket's enabled cipher suites. If there are no required cipher suites the socket must have at
182+
* least one cipher suite enabled.
183+
*
184+
* For protocols, at least one of the [required protocols][tlsVersions] must match the socket's
185+
* enabled protocols.
186+
*/
175187
fun isCompatible(socket: SSLSocket): Boolean {
176188
if (!isTls) {
177189
return false

0 commit comments

Comments
 (0)