Class: WsConnectionData

Inherits:
Object
  • Object
show all
Defined in:
lib/javonet-ruby-sdk/utils/ws_connection_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hostname) ⇒ WsConnectionData

Returns a new instance of WsConnectionData.



4
5
6
# File 'lib/javonet-ruby-sdk/utils/ws_connection_data.rb', line 4

def initialize(hostname)
  @hostname = hostname
end

Instance Attribute Details

#hostnameObject

Returns the value of attribute hostname.



2
3
4
# File 'lib/javonet-ruby-sdk/utils/ws_connection_data.rb', line 2

def hostname
  @hostname
end

Instance Method Details

#==(other) ⇒ Object



16
17
18
# File 'lib/javonet-ruby-sdk/utils/ws_connection_data.rb', line 16

def ==(other)
  other.is_a?(WsConnectionData) && @hostname == other.hostname
end

#connection_typeObject



8
9
10
# File 'lib/javonet-ruby-sdk/utils/ws_connection_data.rb', line 8

def connection_type
  ConnectionType::WEB_SOCKET
end

#serialize_connection_dataObject



12
13
14
# File 'lib/javonet-ruby-sdk/utils/ws_connection_data.rb', line 12

def serialize_connection_data
  [connection_type, 0, 0, 0, 0, 0, 0]
end