Class Jabber::Bytestreams::StreamHost
In: lib/xmpp4r/bytestreams/iq/bytestreams.rb
Parent: REXML::Element

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

Methods

host   host=   jid   jid=   new   port   port=   zeroconf   zeroconf=  

Public Class methods

Initialize a <streamhost/> element

jid:[JID]
host:[String] Hostname or IP address
port:[Fixnum] Port number

[Source]

     # 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

Public Instance methods

Get the host address of the streamhost

[Source]

     # File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 122
122:       def host
123:         attributes['host']
124:       end

Set the host address of the streamhost

[Source]

     # File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 128
128:       def host=(h)
129:         attributes['host'] = h
130:       end

Get the JID of the streamhost

[Source]

     # File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 110
110:       def jid
111:         (a = attributes['jid']) ? JID.new(a) : nil
112:       end

Set the JID of the streamhost

[Source]

     # File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 116
116:       def jid=(j)
117:         attributes['jid'] = (j ? j.to_s : nil)
118:       end

Get the port number of the streamhost

[Source]

     # 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

[Source]

     # 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

[Source]

     # File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 134
134:       def zeroconf
135:         attributes['zeroconf']
136:       end

Set the zeroconf attribute of the streamhost

[Source]

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

[Validate]