class
XMPP::SMState
- XMPP::SMState
- Reference
- Object
Overview
SMState holds Stream Management information regarding the session that can be used to resume session after disconnect
Defined in:
xmpp/event_manager.crConstructors
Instance Method Summary
-
#can_resume? : Bool
Check if this state is valid for resumption
-
#clear_queue
Clear the unacknowledged queue (after successful resend)
- #error : String
- #error=(error : String)
-
#has_unacked_stanzas? : Bool
Check if we have unacknowledged stanzas
- #id : String
- #id=(id : String)
- #inbound : UInt32
- #inbound=(inbound : UInt32)
- #location : String
- #location=(location : String)
- #max : UInt32
- #max=(max : UInt32)
- #outbound : UInt32
- #outbound=(outbound : UInt32)
-
#process_ack(h : UInt32)
Process acknowledgement from server Server sends the count of stanzas it has received
-
#queue_stanza(stanza : String)
Add a stanza to the unacknowledged queue
-
#resumption_expired? : Bool
Check if resumption should be attempted based on max time
-
#stanzas_to_resend : Array(String)
Get stanzas that need to be resent
- #timestamp : Time
- #timestamp=(timestamp : Time)
-
#touch
Update timestamp to current time
- #unacked_stanzas : Array(String)
- #unacked_stanzas=(unacked_stanzas : Array(String))
Constructor Detail
def self.new(id : String = "", inbound : UInt32 = 0_u32, outbound : UInt32 = 0_u32, location : String = "", max : UInt32 = 0_u32, timestamp : Time = Time.utc, error : String = "")
#
Instance Method Detail
def process_ack(h : UInt32)
#
Process acknowledgement from server Server sends the count of stanzas it has received