Skip to content

Instantly share code, notes, and snippets.

@FGasper
Created April 24, 2020 00:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FGasper/10b498a6bafa638b679827fbf8f8902f to your computer and use it in GitHub Desktop.
Save FGasper/10b498a6bafa638b679827fbf8f8902f to your computer and use it in GitHub Desktop.
import zmq
ctx = zmq.Context()
pub = ctx.socket(zmq.PUB)
pub.bind("ipc://.zmq")
sub = ctx.socket(zmq.SUB)
sub.connect("ipc://.zmq")
sub.subscribe("")
pub.send_string("hi")
sub.recv_string()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment