Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for readPacketType (0.39 sec)

  1. src/test/java/jcifs/netbios/SessionServicePacketTest.java

        }
    
        @Test
        @DisplayName("readPacketType should read header and return packet type")
        void testReadPacketType() throws IOException {
            byte[] headerData = { (byte) 0x81, (byte) 0x00, (byte) 0x00, (byte) 0x44 };
            ByteArrayInputStream bais = new ByteArrayInputStream(headerData);
            byte[] buffer = new byte[10];
    
            int type = SessionServicePacket.readPacketType(bais, buffer, 0);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  2. src/main/java/jcifs/netbios/SessionServicePacket.java

                n = in.read(b, off + i, len - i);
                if (n <= 0) {
                    break;
                }
                i += n;
            }
    
            return i;
        }
    
        static int readPacketType(final InputStream in, final byte[] buffer, final int bufferIndex) throws IOException {
            int n = readn(in, buffer, bufferIndex, HEADER_LENGTH);
            if (n != HEADER_LENGTH) {
                if (n == -1) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/netbios/SocketInputStream.java

                    len -= n;
                    bip -= n;
                    if (len == 0) {
                        return tot;
                    }
                }
    
                switch (SessionServicePacket.readPacketType(in, header, 0)) {
                case SessionServicePacket.SESSION_KEEP_ALIVE:
                    break;
                case SessionServicePacket.SESSION_MESSAGE:
                    bip = SessionServicePacket.readLength(header, 0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb1/netbios/SessionServicePacket.java

                n = in.read(b, off + i, len - i);
                if (n <= 0) {
                    break;
                }
                i += n;
            }
    
            return i;
        }
    
        static int readPacketType(final InputStream in, final byte[] buffer, final int bufferIndex) throws IOException {
            int n = readn(in, buffer, bufferIndex, HEADER_LENGTH);
            if (n != HEADER_LENGTH) {
                if (n == -1) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb1/netbios/NbtSocket.java

                out.write(buffer, 0, ssp0.writeWireFormat(buffer, 0));
    
                setSoTimeout(soTimeout);
                type = SessionServicePacket.readPacketType(in, buffer, 0);
            } catch (final IOException ioe) {
                close();
                throw ioe;
            }
    
            switch (type) {
            case SessionServicePacket.POSITIVE_SESSION_RESPONSE:
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6.1K bytes
    - Viewed (0)
Back to top