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

<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 93
93:       def initialize(jid=nil, host=nil, port=nil)
94:         super()
95:         self.jid = jid
96:         self.host = host
97:         self.port = port
98:       end

Public Instance methods

Get the host address of the streamhost

[Source]

     # File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 114
114:       def host
115:         attributes['host']
116:       end

Set the host address of the streamhost

[Source]

     # File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 120
120:       def host=(h)
121:         attributes['host'] = h
122:       end

Get the JID of the streamhost

[Source]

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

Set the JID of the streamhost

[Source]

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

Get the port number of the streamhost

[Source]

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

Set the port number of the streamhost

[Source]

     # File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 145
145:       def port=(p)
146:         attributes['port'] = p.to_s
147:       end

Get the zeroconf attribute of the streamhost

[Source]

     # File lib/xmpp4r/bytestreams/iq/bytestreams.rb, line 126
126:       def zeroconf
127:         attributes['zeroconf']
128:       end

Set the zeroconf attribute of the streamhost

[Source]

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

[Validate]