| Class | Jabber::Bytestreams::StreamHost |
| In: |
lib/xmpp4r/bytestreams/iq/bytestreams.rb
|
| Parent: | REXML::Element |
<streamhost/> element, normally appear as children of IqQueryBytestreams
Initialize a <streamhost/> element
| jid: | [JID] |
| host: | [String] Hostname or IP address |
| port: | [Fixnum] Port number |
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 101
101: def initialize(jid=nil, host=nil, port=nil)
102: super('streamhost')
103: self.jid = jid
104: self.host = host
105: self.port = port
106: end
Get the host address of the streamhost
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 122
122: def host
123: attributes['host']
124: end
Set the host address of the streamhost
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 128
128: def host=(h)
129: attributes['host'] = h
130: end
Get the port number of the streamhost
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 146
146: def port
147: p = attributes['port'].to_i
148: (p == 0 ? nil : p)
149: end
Set the port number of the streamhost
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 153
153: def port=(p)
154: attributes['port'] = p.to_s
155: end
Get the zeroconf attribute of the streamhost
# File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 134
134: def zeroconf
135: attributes['zeroconf']
136: end