xmpp.go
changeset 13 c9527bbe99a6
parent 12 122ab6208c3c
child 15 aa2cf77f0ed3
equal deleted inserted replaced
12:122ab6208c3c 13:c9527bbe99a6
    41 	socketSync sync.WaitGroup
    41 	socketSync sync.WaitGroup
    42 	saslExpected string
    42 	saslExpected string
    43 	authDone bool
    43 	authDone bool
    44 	idMutex sync.Mutex
    44 	idMutex sync.Mutex
    45 	nextId int64
    45 	nextId int64
       
    46 	handlers chan *stanzaHandler
    46 	In <-chan interface{}
    47 	In <-chan interface{}
    47 	Out chan<- interface{}
    48 	Out chan<- interface{}
    48 	xmlOut chan<- interface{}
    49 	xmlOut chan<- interface{}
    49 	TextOut chan<- *string
    50 	TextOut chan<- *string
    50 }
    51 }
    82 
    83 
    83 	cl := new(Client)
    84 	cl := new(Client)
    84 	cl.password = password
    85 	cl.password = password
    85 	cl.Jid = *jid
    86 	cl.Jid = *jid
    86 	cl.socket = tcp
    87 	cl.socket = tcp
       
    88 	cl.handlers = make(chan *stanzaHandler)
    87 
    89 
    88 	// Start the transport handler, initially unencrypted.
    90 	// Start the transport handler, initially unencrypted.
    89 	tlsr, tlsw := cl.startTransport()
    91 	tlsr, tlsw := cl.startTransport()
    90 
    92 
    91 	// Start the reader and writers that convert to and from XML.
    93 	// Start the reader and writers that convert to and from XML.