Skip to content

Commit

Permalink
Merge pull request zeromq#55 from hintjens/master
Browse files Browse the repository at this point in the history
Added FileMQ integration
  • Loading branch information
sjmackenzie committed Dec 1, 2012
2 parents e723d8f + bcf2b5c commit cbde71e
Show file tree
Hide file tree
Showing 35 changed files with 1,125 additions and 153 deletions.
33 changes: 29 additions & 4 deletions C/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ fi
AC_ARG_WITH([libzmq],
[AS_HELP_STRING([--with-libzmq],
[Specify libzmq prefix])],
[czmq_search_libzmq="yes"],
[search_libzmq="yes"],
[])

if test "x$czmq_search_libzmq" = "xyes"; then
if test "x$search_libzmq" = "xyes"; then
if test -r "${with_libzmq}/include/zmq.h"; then
CFLAGS="-I${with_libzmq}/include ${CFLAGS}"
LDFLAGS="-L${with_libzmq}/lib ${LDFLAGS}"
Expand All @@ -93,10 +93,10 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <zmq.h>],
AC_ARG_WITH([libczmq],
[AS_HELP_STRING([--with-libczmq],
[Specify libczmq prefix])],
[zre_search_libczmq="yes"],
[search_libczmq="yes"],
[])

if test "x$zre_search_libczmq" = "xyes"; then
if test "x$search_libczmq" = "xyes"; then
if test -r "${with_libczmq}/include/czmq.h"; then
CFLAGS="-I${with_libczmq}/include ${CFLAGS}"
LDFLAGS="-L${with_libczmq}/lib ${LDFLAGS}"
Expand All @@ -116,6 +116,31 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <czmq.h>],
[AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([no. Please specify libczmq installation prefix using --with-czmq])])

# libfmq integration
AC_ARG_WITH([libfmq],
[AS_HELP_STRING([--with-fmq],
[Specify libfmq prefix])],
[search_libfmq="yes"],
[])

if test "x$search_libfmq" = "xyes"; then
if test -r "${with_libfmq}/include/fmq.h"; then
CFLAGS="-I${with_libfmq}/include ${CFLAGS}"
LDFLAGS="-L${with_libfmq}/lib ${LDFLAGS}"
else
AC_MSG_ERROR([${with_libfmq}/include/fmq.h not found. Please check libfmq prefix])
fi
fi

AC_CHECK_LIB(fmq, fmq_server_new, ,[AC_MSG_ERROR([cannot link with -lfmq, install libfmq.])])

AC_MSG_CHECKING([whether libfmq installation works])
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <fmq.h>],
[fmq_server_new ();])
],
[AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([no. Please specify libfmq installation prefix using --with-fmq])])

#Whether we are on mingw or not.
zre_on_mingw32="no"

Expand Down
17 changes: 11 additions & 6 deletions C/include/zre.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* =========================================================================
zre.h - ZyRE framework in C
zre.h - Zyre library header
-------------------------------------------------------------------------
Copyright (c) 1991-2012 iMatix Corporation <www.imatix.com>
Copyright other contributors as noted in the AUTHORS file.
This file is part of ZyRE, the ZeroMQ Realtime Experience framework:
http://zyre.org.
This file is part of Zyre, an open-source framework for proximity-based
peer-to-peer applications -- See http://zyre.org.
This is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
Expand Down Expand Up @@ -39,14 +39,19 @@
#define ZRE_VERSION \
ZRE_MAKE_VERSION(ZRE_VERSION_MAJOR, ZRE_VERSION_MINOR, ZRE_VERSION_PATCH)

#include <czmq.h>
#if CZMQ_VERSION < 10302
# error "ZyRE needs CZMQ/1.3.2 or later"
# error "Zyre needs CZMQ/1.3.2 or later"
#endif

#include <fmq.h>
#if FMQ_VERSION < 10000
# error "Zyre needs FMQ/1.0.0 or later"
#endif

// Defined port numbers, pending IANA submission

#define PING_PORT_NUMBER 9991
#define LOG_PORT_NUMBER 9992
#define PING_PORT_NUMBER 5670 // UDP port for ZRE discovery

// Constants, to be configured/reviewed

Expand Down
4 changes: 2 additions & 2 deletions C/include/zre_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Copyright (c) 1991-2012 iMatix Corporation <www.imatix.com>
Copyright other contributors as noted in the AUTHORS file.
This file is part of ZyRE, the ZeroMQ Realtime Experience framework:
http://zyre.org.
This file is part of Zyre, an open-source framework for proximity-based
peer-to-peer applications -- See http://zyre.org.
This is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
Expand Down
10 changes: 7 additions & 3 deletions C/include/zre_interface.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* =========================================================================
zre_interface - interface to a ZyRE network
zre_interface - interface to a ZRE network
-------------------------------------------------------------------------
Copyright (c) 1991-2012 iMatix Corporation <www.imatix.com>
Copyright other contributors as noted in the AUTHORS file.
This file is part of ZyRE, the ZeroMQ Realtime Experience framework:
http://zyre.org.
This file is part of Zyre, an open-source framework for proximity-based
peer-to-peer applications -- See http://zyre.org.
This is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
Expand Down Expand Up @@ -73,6 +73,10 @@ void *
void
zre_interface_header_set (zre_interface_t *self, char *name, char *format, ...);

// Publish file into virtual space
void
zre_interface_publish (zre_interface_t *self, char *pathname, char *virtual);

#ifdef __cplusplus
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions C/include/zre_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Copyright (c) 1991-2012 iMatix Corporation <www.imatix.com>
Copyright other contributors as noted in the AUTHORS file.
This file is part of ZyRE, the ZeroMQ Realtime Experience framework:
http://zyre.org.
This file is part of Zyre, an open-source framework for proximity-based
peer-to-peer applications -- See http://zyre.org.
This is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
Expand Down
3 changes: 2 additions & 1 deletion C/include/zre_log_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
Copyright (c) 1991-2012 iMatix Corporation -- http://www.imatix.com
Copyright other contributors as noted in the AUTHORS file.
This file is part of FILEMQ, see http://filemq.org.
This file is part of Zyre, an open-source framework for proximity-based
peer-to-peer applications -- See http://zyre.org.
This is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Expand Down
17 changes: 9 additions & 8 deletions C/include/zre_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
Copyright (c) 1991-2012 iMatix Corporation -- http://www.imatix.com
Copyright other contributors as noted in the AUTHORS file.
This file is part of FILEMQ, see http://filemq.org.
This file is part of Zyre, an open-source framework for proximity-based
peer-to-peer applications -- See http://zyre.org.
This is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Expand Down Expand Up @@ -57,13 +58,13 @@

#define ZRE_MSG_VERSION 1

#define ZRE_MSG_HELLO 10
#define ZRE_MSG_WHISPER 20
#define ZRE_MSG_SHOUT 21
#define ZRE_MSG_JOIN 22
#define ZRE_MSG_LEAVE 23
#define ZRE_MSG_PING 40
#define ZRE_MSG_PING_OK 41
#define ZRE_MSG_HELLO 1
#define ZRE_MSG_WHISPER 2
#define ZRE_MSG_SHOUT 3
#define ZRE_MSG_JOIN 4
#define ZRE_MSG_LEAVE 5
#define ZRE_MSG_PING 6
#define ZRE_MSG_PING_OK 7

#ifdef __cplusplus
extern "C" {
Expand Down
6 changes: 3 additions & 3 deletions C/include/zre_peer.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* =========================================================================
zre_peer - peer to a ZyRE network
zre_peer - ZRE network peer
-------------------------------------------------------------------------
Copyright (c) 1991-2012 iMatix Corporation <www.imatix.com>
Copyright other contributors as noted in the AUTHORS file.
This file is part of ZyRE, the ZeroMQ Realtime Experience framework:
http://zyre.org.
This file is part of Zyre, an open-source framework for proximity-based
peer-to-peer applications -- See http://zyre.org.
This is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions C/include/zre_udp.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Copyright (c) 1991-2012 iMatix Corporation <www.imatix.com>
Copyright other contributors as noted in the AUTHORS file.
This file is part of ZyRE, the ZeroMQ Realtime Experience framework:
http://zyre.org.
This file is part of Zyre, an open-source framework for proximity-based
peer-to-peer applications -- See http://zyre.org.
This is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
Expand Down
2 changes: 0 additions & 2 deletions C/model/generate

This file was deleted.

16 changes: 0 additions & 16 deletions C/model/library.gsl

This file was deleted.

19 changes: 0 additions & 19 deletions C/model/license.xml

This file was deleted.

4 changes: 2 additions & 2 deletions C/src/zre_group.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Copyright (c) 1991-2012 iMatix Corporation <www.imatix.com>
Copyright other contributors as noted in the AUTHORS file.
This file is part of ZyRE, the ZeroMQ Realtime Experience framework:
http://zyre.org.
This file is part of Zyre, an open-source framework for proximity-based
peer-to-peer applications -- See http://zyre.org.
This is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
Expand Down
Loading

0 comments on commit cbde71e

Please sign in to comment.