Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for writePong (0.11 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")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 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)
      }
    
      /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 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) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  4. 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(),
            )
          }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  5. guava/src/com/google/common/io/LittleEndianDataOutputStream.java

      }
    
      /**
       * 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 {
        ((DataOutputStream) out).writeLong(Long.reverseBytes(v));
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 26 12:34:49 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  6. internal/ringbuffer/ring_buffer.go

    			break
    		}
    		err = r.setErr(err, true)
    		if r.block && (err == ErrIsFull || err == ErrTooMuchDataToWrite) {
    			r.writeCond.Broadcast()
    			r.readCond.Wait()
    			p = p[n:]
    			err = nil
    			continue
    		}
    		break
    	}
    	if r.block && wrote > 0 {
    		r.writeCond.Broadcast()
    	}
    
    	return wrote, r.setErr(err, true)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. internal/ringbuffer/ring_buffer_test.go

    				time.Sleep(time.Duration(readRng.Intn(maxSleep)))
    			}
    		}
    	}()
    
    	// Writer
    	{
    		buf := make([]byte, 1024)
    		writeRng := rand.New(rand.NewSource(2))
    		for i := 0; i < 2500; i++ {
    			writeRng.Read(buf)
    			// Write
    			n, err := rb.Write(buf[:writeRng.Intn(len(buf))])
    			if err != nil {
    				t.Fatalf("write failed: %v", err)
    			}
    			wroteBytes += n
    			wrote.Write(buf[:n])
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  8. 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);
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 2K bytes
    - Viewed (0)
  9. 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);
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 2K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb1/ntlmssp/Type1Message.java

                byte[] type1 = new byte[hostInfo ?
                        (32 + domain.length + workstation.length) : 16];
                System.arraycopy(NTLMSSP_SIGNATURE, 0, type1, 0, 8);
                writeULong(type1, 8, 1);
                writeULong(type1, 12, flags);
                if (hostInfo) {
                    writeSecurityBuffer(type1, 16, 32, domain);
                    writeSecurityBuffer(type1, 24, 32 + domain.length, workstation);
                }
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 20:39:42 UTC 2019
    - 8K bytes
    - Viewed (0)
Back to top