module Acknowledgement
Provides acknowledgement functionality for frames that support it. This module handles setting and checking acknowledgement flags on frames.
Definitions
def acknowledgement?
Check if the frame is an acknowledgement.
Signature
-
returns
Boolean
True if the acknowledgement flag is set.
Implementation
def acknowledgement?
flag_set?(ACKNOWLEDGEMENT)
end
def acknowledgement!
Mark this frame as an acknowledgement.
Implementation
def acknowledgement!
set_flags(ACKNOWLEDGEMENT)
end
def acknowledge
Create an acknowledgement frame for this frame.
Signature
-
returns
Frame
A new frame marked as an acknowledgement.
Implementation
def acknowledge
frame = self.class.new
frame.length = 0
frame.set_flags(ACKNOWLEDGEMENT)
return frame
end