GIST to reproduce this issue.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Minimal HTTP server in 0MQ | |
#include "czmq.h" | |
int main (void) | |
{ | |
zctx_t *ctx = zctx_new (); | |
void *router = zsocket_new (ctx, ZMQ_ROUTER); | |
zsocket_set_router_raw (router, 1); | |
int rc = zsocket_bind (router, "tcp://*:8080"); | |
assert (rc != -1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# | |
# c - C compile command | |
# | |
# Copyright (c) 1996-2009 iMatix Corporation | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or (at | |
# your option) any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Minimal WTFP server in 0MQ | |
#include "czmq.h" | |
static void * | |
wtfp_server (void *args) | |
{ | |
zctx_t *ctx = zctx_new (); | |
void *router = zsocket_new (ctx, ZMQ_ROUTER); | |
int rc = zsocket_bind (router, "tcp://*:8080"); | |
assert (rc != -1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PROMPT_COMMAND=__git_prompt | |
__git_prompt () | |
{ | |
txtblk='\e[0;30m' # Black - Regular | |
txtred='\e[0;31m' # Red | |
txtgrn='\e[0;32m' # Green | |
txtylw='\e[0;33m' # Yellow | |
txtblu='\e[0;34m' # Blue | |
txtpur='\e[0;35m' # Purple | |
txtcyn='\e[0;36m' # Cyan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <zmq.h> | |
#include <assert.h> | |
#include <string.h> | |
#include <unistd.h> | |
int main (void) | |
{ | |
void *ctx = zmq_ctx_new (); | |
assert (ctx); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Proof of concept CurveCP handshake over 0MQ. | |
// | |
// Demonstrates a confidential, authenticated connection between | |
// two 0MQ peers (two DEALER sockets in this example). See the | |
// curvecp.org website for details of the security design. | |
// | |
// This is a flat walk-through in code with minimal abstraction. | |
// The next version of this code will be more packaged. | |
// | |
// IMPORTANT NOTE: this code has not been reviewed by security experts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: srv.c | |
g++ srv.c /home/eerihug/dev/BakkaLinux/root/usr/local/lib/libzmq.a -lpthread -lrt -o srv | |
g++ cli.c /home/eerihug/dev/BakkaLinux/root/usr/local/lib/libzmq.a -lpthread -lrt -o cli | |
clean: | |
rm cli | |
rm srv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <assert.h> | |
typedef unsigned char byte; | |
// Maps base 256 to base 85 | |
static char encoder [85 + 1] = { |
NewerOlder