Class: Takagi::Message::RetransmissionManager::PendingTransmission

Inherits:
Struct
  • Object
show all
Defined in:
lib/takagi/message/retransmission_manager.rb

Overview

Pending transmission tracking

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attemptObject

Returns the value of attribute attempt

Returns:

  • (Object)

    the current value of attempt



19
20
21
# File 'lib/takagi/message/retransmission_manager.rb', line 19

def attempt
  @attempt
end

#callbackObject

Returns the value of attribute callback

Returns:

  • (Object)

    the current value of callback



19
20
21
# File 'lib/takagi/message/retransmission_manager.rb', line 19

def callback
  @callback
end

#hostObject

Returns the value of attribute host

Returns:

  • (Object)

    the current value of host



19
20
21
# File 'lib/takagi/message/retransmission_manager.rb', line 19

def host
  @host
end

#message_dataObject

Returns the value of attribute message_data

Returns:

  • (Object)

    the current value of message_data



19
20
21
# File 'lib/takagi/message/retransmission_manager.rb', line 19

def message_data
  @message_data
end

#message_idObject

Returns the value of attribute message_id

Returns:

  • (Object)

    the current value of message_id



19
20
21
# File 'lib/takagi/message/retransmission_manager.rb', line 19

def message_id
  @message_id
end

#next_timeoutObject

Returns the value of attribute next_timeout

Returns:

  • (Object)

    the current value of next_timeout



19
20
21
# File 'lib/takagi/message/retransmission_manager.rb', line 19

def next_timeout
  @next_timeout
end

#portObject

Returns the value of attribute port

Returns:

  • (Object)

    the current value of port



19
20
21
# File 'lib/takagi/message/retransmission_manager.rb', line 19

def port
  @port
end

#socketObject

Returns the value of attribute socket

Returns:

  • (Object)

    the current value of socket



19
20
21
# File 'lib/takagi/message/retransmission_manager.rb', line 19

def socket
  @socket
end

#timeout_atObject

Returns the value of attribute timeout_at

Returns:

  • (Object)

    the current value of timeout_at



19
20
21
# File 'lib/takagi/message/retransmission_manager.rb', line 19

def timeout_at
  @timeout_at
end

Instance Method Details

#timed_out?(current_time) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/takagi/message/retransmission_manager.rb', line 30

def timed_out?(current_time)
  current_time >= timeout_at
end