class Jabber::Bytestreams::StreamHost

<streamhost/> element, normally appear as children of IqQueryBytestreams

Public Class Methods

new(jid=nil, host=nil, port=nil) click to toggle source

Initialize a <streamhost/> element

jid
JID
host
String

Hostname or IP address

port
Fixnum

Port number

Calls superclass method
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 93
def initialize(jid=nil, host=nil, port=nil)
  super()
  self.jid = jid
  self.host = host
  self.port = port
end

Public Instance Methods

host() click to toggle source

Get the host address of the streamhost

# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 114
def host
  attributes['host']
end
host=(h) click to toggle source

Set the host address of the streamhost

# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 120
def host=(h)
  attributes['host'] = h
end
jid() click to toggle source

Get the JID of the streamhost

# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 102
def jid
  (a = attributes['jid']) ? JID.new(a) : nil
end
jid=(j) click to toggle source

Set the JID of the streamhost

# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 108
def jid=(j)
  attributes['jid'] = (j ? j.to_s : nil)
end
port() click to toggle source

Get the port number of the streamhost

# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 138
def port
  p = attributes['port'].to_i
  (p == 0 ? nil : p)
end
port=(p) click to toggle source

Set the port number of the streamhost

# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 145
def port=(p)
  attributes['port'] = p.to_s
end
zeroconf() click to toggle source

Get the zeroconf attribute of the streamhost

# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 126
def zeroconf
  attributes['zeroconf']
end
zeroconf=(s) click to toggle source

Set the zeroconf attribute of the streamhost

# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 132
def zeroconf=(s)
  attributes['zeroconf'] = s
end