Class: Doom::Net::DesyncMonitor::Desync

Inherits:
Struct
  • Object
show all
Defined in:
lib/doom/net/desync_monitor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#localObject

Returns the value of attribute local

Returns:

  • (Object)

    the current value of local



25
26
27
# File 'lib/doom/net/desync_monitor.rb', line 25

def local
  @local
end

#peer_idObject

Returns the value of attribute peer_id

Returns:

  • (Object)

    the current value of peer_id



25
26
27
# File 'lib/doom/net/desync_monitor.rb', line 25

def peer_id
  @peer_id
end

#remoteObject

Returns the value of attribute remote

Returns:

  • (Object)

    the current value of remote



25
26
27
# File 'lib/doom/net/desync_monitor.rb', line 25

def remote
  @remote
end

#sectionsObject

Returns the value of attribute sections

Returns:

  • (Object)

    the current value of sections



25
26
27
# File 'lib/doom/net/desync_monitor.rb', line 25

def sections
  @sections
end

#ticObject

Returns the value of attribute tic

Returns:

  • (Object)

    the current value of tic



25
26
27
# File 'lib/doom/net/desync_monitor.rb', line 25

def tic
  @tic
end

Instance Method Details

#messageObject



26
27
28
29
30
# File 'lib/doom/net/desync_monitor.rb', line 26

def message
  where = sections.nil? || sections.empty? ? 'unknown section' : sections.join(', ')
  "desync at tic #{tic} with peer #{peer_id}: " \
    "local #{format('%08x', local)} != remote #{format('%08x', remote)} (#{where})"
end