Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 35 for writeLong (0.1 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. 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)
  3. 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)
  4. 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)
  5. 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. */
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 32.6K bytes
    - Viewed (0)
  6. 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 );
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 5.1K bytes
    - Viewed (0)
  7. src/main/java/jcifs/ntlmssp/Type1Message.java

                int pos = 0;
    
                System.arraycopy(NTLMSSP_SIGNATURE, 0, type1, 0, NTLMSSP_SIGNATURE.length);
                pos += NTLMSSP_SIGNATURE.length;
    
                writeULong(type1, pos, NTLMSSP_TYPE1);
                pos += 4;
    
                writeULong(type1, pos, flags);
                pos += 4;
    
                int domOffOff = writeSecurityBuffer(type1, pos, domain);
                pos += 8;
    
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Sep 02 12:55:08 UTC 2018
    - 7.8K bytes
    - Viewed (0)
  8. 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)
  9. 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);
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 20:39:42 UTC 2019
    - 4.3K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb1/ntlmssp/Type2Message.java

                        (targetInformation != null ? targetInformation.length : 0)];
                System.arraycopy(NTLMSSP_SIGNATURE, 0, type2, 0, 8);
                writeULong(type2, 8, 2);
                writeSecurityBuffer(type2, 12, data, target);
                writeULong(type2, 20, flags);
                System.arraycopy(challenge != null ? challenge : new byte[8], 0,
                        type2, 24, 8);
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 20:39:42 UTC 2019
    - 12.6K bytes
    - Viewed (0)
Back to top