examples/interact.go
changeset 23 b5de44679389
parent 9 4fe926b03827
child 26 4d0a369079ce
equal deleted inserted replaced
22:d6b7b4cbf50d 23:b5de44679389
    28 	if err != nil {
    28 	if err != nil {
    29 		log.Fatalf("NewClient(%v): %v", jid, err)
    29 		log.Fatalf("NewClient(%v): %v", jid, err)
    30 	}
    30 	}
    31 	defer c.Close()
    31 	defer c.Close()
    32 
    32 
    33 	go func(ch <-chan interface{}) {
    33 	go func(ch <-chan xmpp.Stanza) {
    34 		for obj := range ch {
    34 		for obj := range ch {
    35 			fmt.Printf("s: %v\n", obj)
    35 			fmt.Printf("s: %v\n", obj)
    36 		}
    36 		}
    37 		fmt.Println("done reading")
    37 		fmt.Println("done reading")
    38 	}(c.In)
    38 	}(c.In)