- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for ServerSocket (0.09 sec)
-
okhttp/src/test/java/okhttp3/internal/UtilTest.kt
@Test fun socketIsHealthy() { val localhost = InetAddress.getLoopbackAddress() val serverSocket = ServerSocket(0, 1, localhost) val socket = Socket() socket.connect(serverSocket.localSocketAddress) val socketSource = socket.source().buffer() assertThat(socket.isHealthy(socketSource)).isTrue() serverSocket.close() assertThat(socket.isHealthy(socketSource)).isFalse() } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocksProxy.kt
private var serverSocket: ServerSocket? = null private val connectionCount = AtomicInteger() private val openSockets = Collections.newSetFromMap(ConcurrentHashMap<Socket, Boolean>()) fun play() { serverSocket = ServerSocket(0) executor.execute { val threadName = "SocksProxy ${serverSocket!!.localPort}" Thread.currentThread().name = threadName try {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 7.7K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingServerSocketFactory.kt
@Throws(IOException::class) override fun createServerSocket(): ServerSocket { val serverSocket = delegate.createServerSocket() return configureServerSocket(serverSocket) } @Throws(IOException::class) override fun createServerSocket(port: Int): ServerSocket { val serverSocket = delegate.createServerSocket(port) return configureServerSocket(serverSocket) } @Throws(IOException::class)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt
private lateinit var executorService: ExecutorService private var serverSocket: ServerSocket? = null @BeforeEach fun setUp() { executorService = Executors.newCachedThreadPool(threadFactory("HandshakeCertificatesTest")) } @AfterEach fun tearDown() { executorService.shutdown() serverSocket?.closeQuietly() } @Test fun clientAndServer() { platform.assumeNotConscrypt()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 7.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt
object : DelegatingServerSocketFactory(getDefault()) { @Throws(SocketException::class) override fun configureServerSocket(serverSocket: ServerSocket): ServerSocket { serverSocket.setReceiveBufferSize(SOCKET_BUFFER_SIZE) return serverSocket } } client = clientTestRule.newClientBuilder() .socketFactory(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
guava/src/com/google/common/base/FinalizableReferenceQueue.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Jul 11 20:51:36 UTC 2024 - 13.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt
object : DelegatingServerSocketFactory(ServerSocketFactory.getDefault()) { @Throws(IOException::class) override fun configureServerSocket(serverSocket: ServerSocket): ServerSocket { serverSocket.receiveBufferSize = SOCKET_BUFFER_SIZE return serverSocket } } if (connectionType != HTTP) { server.useHttps(handshakeCertificates.sslSocketFactory()) } server.start()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 9.9K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt
private val sslSocketFactory: SSLSocketFactory, ) : Http2Connection.Listener() { private fun run() { val serverSocket = ServerSocket(8888) serverSocket.reuseAddress = true while (true) { var socket: Socket? = null try { socket = serverSocket.accept() val sslSocket = doSsl(socket) val protocolString = Platform.get().getSelectedProtocol(sslSocket)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt
return writer } fun takeFrame(): InFrame = inFrames.take() fun play() { check(serverSocket == null) serverSocket = ServerSocket() serverSocket!!.reuseAddress = false serverSocket!!.bind(InetSocketAddress("localhost", 0), 1) port = serverSocket!!.localPort executor.execute { try { readAndWriteFrames() } catch (e: IOException) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 8.7K bytes - Viewed (0) -
samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainServerSocketFactory.java
this.path = path; } @Override public ServerSocket createServerSocket() throws IOException { return new UnixDomainServerSocket(); } @Override public ServerSocket createServerSocket(int port) throws IOException { return createServerSocket(); } @Override public ServerSocket createServerSocket(int port, int backlog) throws IOException { return createServerSocket();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Feb 12 16:33:52 UTC 2019 - 3.1K bytes - Viewed (0)