Skip to content

Instantly share code, notes, and snippets.

View hiway's full-sized avatar

Harshad Sharma hiway

View GitHub Profile
@hiway
hiway / zmq_http_server_example.py
Last active July 11, 2020 06:53 — forked from malexer/zmq_http_server_example.py
Hello World HTTP server in pyzmq (using ZeroMQ RAW socket) - a Python3.5+ version of http://gist.github.com/hintjens/5480625
# coding=utf-8
import zmq
DEFAULT_PAGE = '\r\n'.join([
"HTTP/1.0 200 OK",
"Content-Type: text/plain",
"",
"Hello, World!",
])
@hiway
hiway / asyncsrv.py
Last active October 2, 2016 05:40 — forked from felipecruz/asyncsrv.py
python zmq async server example
"""
ZMQ with Threaded Workers on Python 3
Python 3 compatible port of: https://gist.github.com/felipecruz/883983
"""
import zmq
import threading
import time
from random import choice