equal
deleted
inserted
replaced
215 break |
215 break |
216 } |
216 } |
217 } |
217 } |
218 } |
218 } |
219 |
219 |
220 // BUG(cjyar) Allow extensions to specify extended structs with |
|
221 // corresponding namespaces via "func(xml.Name) Stanza". |
|
222 // BUG(cjyar) Allow extensions to provide filters in the form of "in |
220 // BUG(cjyar) Allow extensions to provide filters in the form of "in |
223 // chan<- Stanza, out <-chan Stanza". |
221 // chan<- Stanza, out <-chan Stanza". |
224 func (cl *Client) readStream(srvIn <-chan interface{}, cliOut chan<- Stanza) { |
222 func (cl *Client) readStream(srvIn <-chan interface{}, cliOut chan<- Stanza) { |
225 defer tryClose(srvIn, cliOut) |
223 defer tryClose(srvIn, cliOut) |
226 |
224 |
554 hex(h(a2)))) |
552 hex(h(a2)))) |
555 return response |
553 return response |
556 } |
554 } |
557 |
555 |
558 // BUG(cjyar) This should use iq.nested rather than iq.generic. |
556 // BUG(cjyar) This should use iq.nested rather than iq.generic. |
|
557 |
559 // Send a request to bind a resource. RFC 3920, section 7. |
558 // Send a request to bind a resource. RFC 3920, section 7. |
560 func (cl *Client) bind(bind *Generic) { |
559 func (cl *Client) bind(bind *Generic) { |
561 res := cl.Jid.Resource |
560 res := cl.Jid.Resource |
562 msg := &Iq{Type: "set", Id: <- cl.Id, Any: |
561 msg := &Iq{Type: "set", Id: <- cl.Id, Any: |
563 &Generic{XMLName: xml.Name{Space: NsBind, Local: |
562 &Generic{XMLName: xml.Name{Space: NsBind, Local: |