Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty chat record on Recv #13

Open
gatlin opened this issue Jun 16, 2012 · 4 comments
Open

Empty chat record on Recv #13

gatlin opened this issue Jun 16, 2012 · 4 comments

Comments

@gatlin
Copy link

gatlin commented Jun 16, 2012

I am using a slightly modified version of your example code (go-iconv doesn't work on my version of Mac OS X but github.com/djimenez/iconv-go does work => my UTF8 conversion functions are slightly different). I can send messages just fine and I can produce some kind of output every time I receive one but the chat record itself is empty. I verified this with

go func() {
    for {
        chat, err := talk.Recv()
        if err != nil {
            log.Fatal(err)
            fmt.Printf("Trouble receiving chat\n")
        }
        fmt.Printf("%v\n", chat)
    }
}()

And I receive { } for each message. Connecting to google talk servers.

@gatlin
Copy link
Author

gatlin commented Jun 16, 2012

I changed the beginning of init to c.p = xml.NewDecoder(tee{c.tls, os.Stdout}); which caused raw XML stanzas to be printed. By doing this I verified that the stanzas are in fact being sent and received correctly at a lower level. It's just that next isn't producing the clientMessage struct correctly. I'm a bit new to Go so I can't tell for sure but it must have something to do with the reflection code.

@mdosch
Copy link
Collaborator

mdosch commented Mar 28, 2024

@gatlin is this still an issue?

@gatlin
Copy link
Author

gatlin commented Mar 28, 2024

@mdosch I will reinstall Go and let you know asap!

@mdosch
Copy link
Collaborator

mdosch commented Mar 28, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants