Skip to content
ThreaT edited this page May 14, 2015 · 20 revisions

Overview

Frames can be parts or all of a text or binary data message.

CloseFrame

Unknown

CloseFrameBuilder

Unknown

FrameBuilder

Unknown

Framedata

This interface provides the implementation for a frame.

isFin() represents the first bit in the frame which marks the frame as the final or non-final frame of a message. Messages are made up of multiple frames.

getOpcode() are bits 3-7 and is used to determine the type of data that the frame is sending. 0 - Continuation Frame 1 - Text Frame 2- Binary Frame 8 - Connection Close Frame 9 - Ping Frame 10 - Pong Frame

getTransferredMasked() is the 8th bit and is used to determine if the clients payload is masked. Masking payloads is used to prevent proxy cache poisoning attacks. The 32-bit value taken from the frame header that masks the payload is placed between bits 48-80.

Missing Method it is recommended that a new method be introduced to identify payload length. Payload length utilises bits 9-15. If payload length is 0-125 then the method should return the length. If the payload length is 126 then the method should read the following 16 bits and return the 16-bit unsigned integer they contain. If the payload length is 127 then the method should read the following 64 bits and return the 64-bit unsigned integer they contain.

getPayloadData() is used to get the payload data from bit 80 onwards.

FramedataImpl1

Unknown