cgo libnice binding will stuck

62 views
Skip to first unread message

xiang liu

unread,
May 22, 2019, 4:05:12 AM5/22/19
to golang-nuts
Hi:

I try to use cgo binding libnice to do p2p transport,  It  seems the cgo binding will stuck

WechatIMG322.png












that works well on linux. anyone can give a hint on this?

Thanks

xiang liu

unread,
May 22, 2019, 4:05:54 AM5/22/19
to golang-nuts
I mean it  will stuck on macos,  works fun on linux.


在 2019年5月22日星期三 UTC+8下午4:05:12,xiang liu写道:

Jan Mercl

unread,
May 22, 2019, 4:43:27 AM5/22/19
to xiang liu, golang-nuts
On Wed, May 22, 2019 at 10:05 AM xiang liu <leeo...@gmail.com> wrote:

Please use only plain text for source code in emails. Where available,
a link to play.golang.org is also good. Thanks.

xiang liu

unread,
May 22, 2019, 6:09:03 AM5/22/19
to golang-nuts
Sorry about this. 

在 2019年5月22日星期三 UTC+8下午4:43:27,Jan Mercl写道:

Tyler Compton

unread,
May 22, 2019, 6:16:10 PM5/22/19
to xiang liu, golang-nuts
Beyond just mailing list etiquette, you'll probably get better responses if you provide your code in plain text. I think that some of the more responsive people in golang-nuts use text-only email viewers, though that's only a guess!

I took the liberty of transcribing this one, free of charge :)

func (a *Agent) GatherCandidates() error {
    a.mtx.Lock()
    defer a.mtx.Unlock()
    fmt.Println("GatherCandidates11111")
    rv := int(C.nice_agent_gather_candidates(a.agent, C.guint(a.stream)))
    if rv == 0 {
        return errors.New("failed to gather candidates")
    }
    fmt.Println("GatherCandidates22222")
    return nil
}


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1379f6a2-e700-43ed-8cf6-c633ea567d1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

xiang liu

unread,
May 22, 2019, 10:42:03 PM5/22/19
to Tyler Compton, golang-nuts
Thanks,  this code block will stuck on macos,   `C.nice_agent_gather_candidates`  just does not return.
Works fun on linux.
Maybe there is a bug when use cgo with glib or libnice or gnutls on macos.

Tyler Compton <xav...@gmail.com> 于2019年5月23日周四 上午6:15写道:
Reply all
Reply to author
Forward
0 new messages