Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for writePong (0.33 sec)

  1. okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

        clientWriter.writePing("Hello".encodeUtf8())
        assertData("898560b420bb28d14cd70f")
      }
    
      @Test fun serverEmptyPong() {
        serverWriter.writePong(EMPTY)
        assertData("8a00")
      }
    
      @Test fun clientEmptyPong() {
        clientWriter.writePong(EMPTY)
        assertData("8a8060b420bb")
      }
    
      @Test fun serverPongWithPayload() {
        serverWriter.writePong("Hello".encodeUtf8())
        assertData("8a0548656c6c6f")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

      /** Send a ping with the supplied [payload]. */
      @Throws(IOException::class)
      fun writePing(payload: ByteString) {
        writeControlFrame(OPCODE_CONTROL_PING, payload)
      }
    
      /** Send a pong with the supplied [payload]. */
      @Throws(IOException::class)
      fun writePong(payload: ByteString) {
        writeControlFrame(OPCODE_CONTROL_PONG, payload)
      }
    
      /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

              }
            } else if (messageOrClose == null) {
              return false // The queue is exhausted.
            }
          }
        }
    
        try {
          if (pong != null) {
            writer!!.writePong(pong)
          } else if (messageOrClose is Message) {
            val message = messageOrClose as Message
            writer!!.writeMessageFrame(message.formatOpcode, message.data)
            synchronized(this) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/LittleEndianDataOutputStream.java

        out.write(0xFF & (v >> 24));
      }
    
      /**
       * Writes a {@code long} as specified by {@link DataOutputStream#writeLong(long)}, except using
       * little-endian byte order.
       *
       * @throws IOException if an I/O error occurs
       */
      @Override
      public void writeLong(long v) throws IOException {
        byte[] bytes = Longs.toByteArray(Long.reverseBytes(v));
        write(bytes, 0, bytes.length);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt

        val from = nextAddress
        nextAddress += count
        return (from until nextAddress)
          .map {
            return@map InetAddress.getByAddress(
              Buffer().writeLong(0L).writeLong(it).readByteArray(),
            )
          }
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/ByteArrayDataOutput.java

      @Override
      void writeByte(int v);
    
      @Override
      void writeShort(int v);
    
      @Override
      void writeChar(int v);
    
      @Override
      void writeInt(int v);
    
      @Override
      void writeLong(long v);
    
      @Override
      void writeFloat(float v);
    
      @Override
      void writeDouble(double v);
    
      @Override
      void writeChars(String s);
    
      @Override
      void writeUTF(String s);
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

      @Throws(InterruptedException::class)
      fun writePingAndAwaitPong() {
        writePing()
        awaitPong()
      }
    
      /** For testing: sends a ping to be awaited with [awaitPong]. */
      @Throws(InterruptedException::class)
      fun writePing() {
        this.withLock {
          awaitPingsSent++
        }
    
        // 0x4f 0x4b 0x6f 0x6b is "OKok".
        writePing(false, AWAIT_PING, 0x4f4b6f6b)
      }
    
      /** For testing: awaits a pong. */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/ntlmssp/NtlmMessage.java

            int offset = readULong(src, index + 4);
            byte[] buffer = new byte[length];
            System.arraycopy(src, offset, buffer, 0, length);
            return buffer;
        }
    
        static void writeULong(byte[] dest, int offset, int ulong) {
            dest[offset] = (byte) (ulong & 0xff);
            dest[offset + 1] = (byte) (ulong >> 8 & 0xff);
            dest[offset + 2] = (byte) (ulong >> 16 & 0xff);
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Fri Mar 22 20:39:42 GMT 2019
    - 4.3K bytes
    - Viewed (0)
  9. src/main/java/jcifs/ntlmssp/NtlmMessage.java

            int offset = readULong(src, index + 4);
            byte[] buffer = new byte[length];
            System.arraycopy(src, offset, buffer, 0, length);
            return buffer;
        }
    
    
        static void writeULong ( byte[] dest, int offset, int ulong ) {
            dest[ offset ] = (byte) ( ulong & 0xff );
            dest[ offset + 1 ] = (byte) ( ulong >> 8 & 0xff );
            dest[ offset + 2 ] = (byte) ( ulong >> 16 & 0xff );
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 5.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        out.writeByte(100);
        out.writeByte(-100);
        out.writeByte((byte) 200);
        out.writeChar('a');
        out.writeShort((short) -30000);
        out.writeShort((short) 50000);
        out.writeInt(0xCAFEBABE);
        out.writeLong(0xDEADBEEFCAFEBABEL);
        out.writeUTF("Herby Derby");
        out.writeFloat(Float.intBitsToFloat(0xCAFEBABE));
        out.writeDouble(Double.longBitsToDouble(0xDEADBEEFCAFEBABEL));
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
Back to top