Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for socketPolicy (0.12 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/SocketPolicy.kt

      ) : SocketPolicy
    
      /** Don't trust the client during the SSL handshake. */
      object FailHandshake : SocketPolicy
    
      /**
       * Shutdown the socket input after sending the response. For testing bad behavior.
       *
       * See [SocketPolicy] for reasons why this can cause test flakiness and how to avoid it.
       */
      object ShutdownInputAtEnd : SocketPolicy
    
      /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/SocketPolicy.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.mockwebserver
    
    enum class SocketPolicy {
      SHUTDOWN_SERVER_AFTER_RESPONSE,
      KEEP_OPEN,
      DISCONNECT_AT_END,
      UPGRADE_TO_SSL_AT_END,
      DISCONNECT_AT_START,
      DISCONNECT_AFTER_REQUEST,
      DISCONNECT_DURING_REQUEST_BODY,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1K bytes
    - Viewed (0)
  3. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt

        mockResponse = mockResponse.setBody(Buffer())
        mockResponse = mockResponse.setChunkedBody(Buffer(), 0)
        mockResponse = mockResponse.setChunkedBody("", 0)
        var socketPolicy: SocketPolicy = mockResponse.socketPolicy
        mockResponse.socketPolicy = SocketPolicy.KEEP_OPEN
        var http2ErrorCode: Int = mockResponse.http2ErrorCode
        mockResponse.http2ErrorCode = 0
        mockResponse = mockResponse.throttleBody(0L, 0L, TimeUnit.SECONDS)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  4. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

    }
    
    private fun MockResponse.wrapSocketPolicy(): mockwebserver3.SocketPolicy {
      return when (val socketPolicy = socketPolicy) {
        SocketPolicy.SHUTDOWN_SERVER_AFTER_RESPONSE -> ShutdownServerAfterResponse
        SocketPolicy.KEEP_OPEN -> KeepOpen
        SocketPolicy.DISCONNECT_AT_END -> DisconnectAtEnd
        SocketPolicy.DISCONNECT_AT_START -> DisconnectAtStart
        SocketPolicy.DISCONNECT_AFTER_REQUEST -> DisconnectAfterRequest
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  5. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

      @Deprecated(
        message = "moved to var",
        replaceWith = ReplaceWith(expression = "socketPolicy"),
        level = DeprecationLevel.ERROR,
      )
      fun getSocketPolicy(): SocketPolicy = socketPolicy
    
      fun setSocketPolicy(socketPolicy: SocketPolicy) =
        apply {
          this.socketPolicy = socketPolicy
        }
    
      @JvmName("-deprecated_getHttp2ErrorCode")
      @Deprecated(
        message = "moved to var",
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  6. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/Dispatcher.kt

    abstract class Dispatcher {
      @Throws(InterruptedException::class)
      abstract fun dispatch(request: RecordedRequest): MockResponse
    
      open fun peek(): MockResponse {
        return MockResponse().apply { this.socketPolicy = SocketPolicy.KEEP_OPEN }
      }
    
      open fun shutdown() {}
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Oct 18 12:55:43 UTC 2020
    - 909 bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

    import assertk.assertions.isNotNull
    import assertk.fail
    import javax.net.ssl.SSLSocket
    import kotlin.test.assertFailsWith
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.SocketPolicy.DoNotReadRequestBody
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.internal.duplex.AsyncRequestBody
    import okhttp3.internal.http2.ErrorCode
    import okhttp3.testing.PlatformRule
    import okio.BufferedSink
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

    import java.security.cert.X509Certificate
    import java.time.Duration
    import kotlin.test.assertFailsWith
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.SocketPolicy.DisconnectAtStart
    import mockwebserver3.SocketPolicy.ShutdownOutputAtEnd
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.RequestBody.Companion.toRequestBody
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  9. mockwebserver/src/main/kotlin/mockwebserver3/Dispatcher.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package mockwebserver3
    
    import mockwebserver3.SocketPolicy.KeepOpen
    import okhttp3.ExperimentalOkHttpApi
    
    /** Handler for mock server requests. */
    @ExperimentalOkHttpApi
    abstract class Dispatcher {
      /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/ConnectionListenerTest.kt

    import java.time.Duration
    import java.util.Arrays
    import java.util.concurrent.TimeUnit
    import kotlin.test.assertFailsWith
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.SocketPolicy.FailHandshake
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.internal.DoubleInetAddressDns
    import okhttp3.internal.connection.RealConnectionPool.Companion.get
    import okhttp3.testing.Flaky
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 9.6K bytes
    - Viewed (0)
Back to top