Skip to content

Instantly share code, notes, and snippets.

@hintjens
hintjens / README.md
Created February 14, 2016 10:59
GYP --generator-output issue

GIST to reproduce this issue.

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libczmq
LOCAL_SRC_FILES := ../../builds/android/prefix/arm-linux-androideabi-4.9/lib/libczmq.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libzmq
LOCAL_SRC_FILES := ../../builds/android/prefix/arm-linux-androideabi-4.9/lib/libzmq.a
# CtrlcTest.java
import org.zeromq.czmq.Zmsg;
import org.zeromq.zyre.Zyre;
import static java.lang.System.*;
import java.util.Scanner;
public class CtrlcTest {
@hintjens
hintjens / testcase1.c
Last active October 29, 2015 09:31
Test case for issue 1608
// Test case for #1608
#include <czmq.h>
#define BATCH_SIZE 5000
static void
sink_actor (zsock_t *pipe, void *args)
{
int latency [BATCH_SIZE];
int count = 0;
<class
name = "sadl_msg"
title = "The SADL Message Protocol"
script = "zproto_codec_c"
package_dir = "."
>
This implements the wireframe SADL protocol
<message name = "PUBLISH">
Client sends data to a topic
<class
name = "hello"
title = "The Hello Protocol"
script = "zproto_codec_c"
package_dir = "."
>
This is a hello world example.
<message name = "HELLO">
Client sends request
<field name = "request" type = "string" />
/* =========================================================================
zyre_perf - bulk test tool
This tool starts a number R of responders, then sends M messages to each
responder, and waits for responses.
This test runs in a single process and does the following:
A master thread sends N "shout" messages to R responders
Each responder sends a unicast "whisper" response back to the master
zactor_t *server = zactor_new (mlm_server, "malamute");
zsock_send (server, "ssi", "SET", "server/verbose", false);
zsock_send (server, "sss", "SET", "server/timeout", "0");
zsock_send (server, "ss", "BIND", "inproc://some-port");
#include <malamute.h>
int main (void) {
zactor_t *server = zactor_new (mlm_server, NULL);
zsock_send (server, "sss", "SET", "server/verbose", "1");
zsock_send (server, "ss", "BIND", "inproc://testcase");
mlm_client_verbose = true;
mlm_client_t *client = mlm_client_new ();
int rc = mlm_client_connect (client, "inproc://testcase", 2000, "");
/* =========================================================================
hydrad - command-line service
Copyright (c) the Contributors as noted in the AUTHORS file.
This file is part of the Hydra Project
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
=========================================================================