-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Framing
Frames can be parts or all of a text or binary data message.
Unknown
Unknown
Unknown
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.
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.
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
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.
Unknown