forked from jshiffer/go-xmpp
Merge commit '7ff519ae8cc28bebbd35'
This commit is contained in:
commit
fc3904b3a3
@ -10,6 +10,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var server = flag.String("server", "talk.google.com:443", "server")
|
||||
var username = flag.String("username", "", "username")
|
||||
var password = flag.String("password", "", "password")
|
||||
|
||||
@ -24,7 +25,7 @@ func main() {
|
||||
flag.Usage()
|
||||
}
|
||||
|
||||
talk, err := xmpp.NewClient("talk.google.com:443", *username, *password)
|
||||
talk, err := xmpp.NewClient(*server, *username, *password)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
2
xmpp.go
2
xmpp.go
@ -45,7 +45,7 @@ type Client struct {
|
||||
|
||||
// NewClient creates a new connection to a host given as "hostname" or "hostname:port".
|
||||
// If host is not specified, the DNS SRV should be used to find the host from the domainpart of the JID.
|
||||
// Default the port to 5222.
|
||||
// Default the port to 5222.
|
||||
func NewClient(host, user, passwd string) (*Client, os.Error) {
|
||||
addr := host
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user