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

EPGM not supported? #32

Closed
mengzhuo opened this issue Jan 6, 2015 · 1 comment
Closed

EPGM not supported? #32

mengzhuo opened this issue Jan 6, 2015 · 1 comment

Comments

@mengzhuo
Copy link

mengzhuo commented Jan 6, 2015

OS: Ubuntu/3.13.0-34-generic
go version go1.4 linux/amd64

sender.go

package main

import (
        zmq "github.com/pebbe/zmq4"

        "log"
        "os"
        "time"
)

func main() {
        publisher, err := zmq.NewSocket(zmq.PUB)

        if err != nil {
                log.Fatal(err)
        }

        if len(os.Args) == 2 {
                publisher.Connect(os.Args[1])
                log.Printf(os.Args[1])
        } else {
                publisher.Connect("epgm://eth0;239.0.0.1:5566")
        }
        defer publisher.Close()

        log.Printf("Publisher bind to: %s", publisher)

        for {
                publisher.SendMessage("Hi")
                time.Sleep(1 * time.Second)
                log.Printf("Sended")
        }
}

recv.go

package main

import (
        zmq "github.com/pebbe/zmq4"

        "log"
        "os"
)

func main() {
        subscriber, err := zmq.NewSocket(zmq.SUB)

        if err != nil {
                log.Fatal(err)
        }

        if len(os.Args) == 2 {
                subscriber.Connect(os.Args[1])
                log.Printf(os.Args[1])
        } else {
                subscriber.Connect("epgm://239.0.0.1:5566")
        }
        defer subscriber.Close()
        subscriber.SetSubscribe("")

        for {
                msg, e := subscriber.RecvMessage(0)

                if e != nil {
                        return
                }
                log.Printf("Recv: %s", msg)
        }
}

Neither the recv.go nor Wireshark filtering "udp.dstport == 5566" receving any package.

Minor: OpenPGM 5.2.122 (1487) 2015-01-06 09:38:32 Linux x86_64
Minor: Detected 2 available 2 online 2 configured CPUs.
Minor: Using gettimeofday() timer.
@mengzhuo
Copy link
Author

mengzhuo commented Jan 6, 2015

I understood what is happening

It's the arg of URI
For example:
The interface you wish to broadcast is eth0, which assigned you with an IP "10.5.4.152"

❌ epgm://eth0;239.0.0.1:5566
❌ epgm://239.0.0.1:5566
✔️ epgm://10.5.4.152;239.0.0.1:5566

@mengzhuo mengzhuo closed this as completed Jan 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant