GithubHelp home page GithubHelp logo

fjxhkj / ahkzmq Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tinku99/ahkzmq

0.0 1.0 0.0 266 KB

zeromq bindings for autohotkey

C++ 20.75% C 22.78% Python 3.22% AutoHotkey 15.60% Common Lisp 0.90% JavaScript 36.75%

ahkzmq's Introduction

ahkzmq

ahkzmq is an AutoHotkey_L wrapper for zeromq.

urls

https://autohotkey.com/board/topic/79218-zeromq-class/ https://github.com/tinku99/ahkzmq

zeromq

zeromq is a socket library that:

  • Carries messages across inproc, IPC, TCP, and multicast.
  • Connect N-to-N via fanout, pubsub, pipeline, request-reply.
  • supports interaction between 30+ languages including C, C++, Java, .NET, Python, and now autohotkey!

Examples

  1. rep/req example from the zguide
#singleinstance off	
z := zstart("tcp://localhost:5555")
omsg := ["hello", "from", "autohotkey"]
msg := zsendrcv(z, omsg)
loop % msg.count{
msgbox % msg[A_Index]
}

return

f2::
zsendrcv(z, omsg)
return
;; hotkeys                                  
!r::reload

!q::exitapp
  
;; includes
#include lib\zmq.ahk
#include lib\json.ahk

hwjsonserver.py

import zmq
import time

context = zmq.Context()
socket = context.socket(zmq.REP)
socket.bind("tcp://*:5555")
 
while True:
    #  Wait for next request from client
    message = socket.recv_json()
    print "Received request: ", message
                         
    socket.send_json({"count": 2, 1: "echo" , 2: " from server"})
 

History

the tcp class, example from the german forum inspired me to take another crack at zeromq in ahk.

ahkzmq's People

Contributors

fjxhkj avatar tinku99 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.