import org.zeromq.ZMQ; public class JeroMQExample { public static void main(String[] args) { ZMQ.Context context = ZMQ.context(1); ZMQ.Socket socket = context.socket(ZMQ.REQ); socket.connect("tcp://localhost:5555"); socket.send("Hello, JeroMQ!"); String reply = socket.recvStr(); System.out.println("Received reply: " + reply); socket.close(); context.term(); } }


上一篇:
下一篇:
切换中文