Created
October 15, 2014 14:50
-
-
Save haarts/5499bd5a41c7e6042c21 to your computer and use it in GitHub Desktop.
Get something from the notary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
zmq "github.com/pebbe/zmq4" | |
) | |
func main() { | |
sock, err := zmq.NewSocket(zmq.SUB) | |
if err != nil { | |
log.Fatal(err) | |
} | |
sock.SetSubscribe("") | |
sock.Connect("tcp://127.0.0.1:5555") | |
fmt.Printf("sock %+v\n", sock) | |
for { | |
val, err := sock.Recv(0) | |
if err != nil { | |
log.Fatal(err) | |
} | |
fmt.Printf("val %+v\n", val) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment