class XMPP::SMState

Overview

SMState holds Stream Management information regarding the session that can be used to resume session after disconnect

Defined in:

xmpp/event_manager.cr

Constructors

Instance Method Summary

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 = "") #

[View source]

Instance Method Detail

def can_resume? : Bool #

Check if this state is valid for resumption


[View source]
def clear_queue #

Clear the unacknowledged queue (after successful resend)


[View source]
def error : String #

[View source]
def error=(error : String) #

[View source]
def has_unacked_stanzas? : Bool #

Check if we have unacknowledged stanzas


[View source]
def id : String #

[View source]
def id=(id : String) #

[View source]
def inbound : UInt32 #

[View source]
def inbound=(inbound : UInt32) #

[View source]
def location : String #

[View source]
def location=(location : String) #

[View source]
def max : UInt32 #

[View source]
def max=(max : UInt32) #

[View source]
def outbound : UInt32 #

[View source]
def outbound=(outbound : UInt32) #

[View source]
def process_ack(h : UInt32) #

Process acknowledgement from server Server sends the count of stanzas it has received


[View source]
def queue_stanza(stanza : String) #

Add a stanza to the unacknowledged queue


[View source]
def resumption_expired? : Bool #

Check if resumption should be attempted based on max time


[View source]
def stanzas_to_resend : Array(String) #

Get stanzas that need to be resent


[View source]
def timestamp : Time #

[View source]
def timestamp=(timestamp : Time) #

[View source]
def touch #

Update timestamp to current time


[View source]
def unacked_stanzas : Array(String) #

[View source]
def unacked_stanzas=(unacked_stanzas : Array(String)) #

[View source]