forked from jshiffer/go-xmpp
add send/sendorg return values
This commit is contained in:
parent
08299587ec
commit
d03bc801da
8
xmpp.go
8
xmpp.go
@ -535,15 +535,15 @@ func (c *Client) Recv() (event interface{}, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Send sends message text.
|
// Send sends message text.
|
||||||
func (c *Client) Send(chat Chat) {
|
func (c *Client) Send(chat Chat) (n int, err error) {
|
||||||
fmt.Fprintf(c.conn, "<message to='%s' type='%s' xml:lang='en'>"+
|
return fmt.Fprintf(c.conn, "<message to='%s' type='%s' xml:lang='en'>"+
|
||||||
"<body>%s</body></message>",
|
"<body>%s</body></message>",
|
||||||
xmlEscape(chat.Remote), xmlEscape(chat.Type), xmlEscape(chat.Text))
|
xmlEscape(chat.Remote), xmlEscape(chat.Type), xmlEscape(chat.Text))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send origin
|
// Send origin
|
||||||
func (c *Client) SendOrg(org string) {
|
func (c *Client) SendOrg(org string) (n int, err error) {
|
||||||
fmt.Fprint(c.conn, org)
|
return fmt.Fprint(c.conn, org)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RFC 3920 C.1 Streams name space
|
// RFC 3920 C.1 Streams name space
|
||||||
|
Loading…
Reference in New Issue
Block a user