Clone this repo:
  1. 5eb7320 clean fix of memory leak in btcp.c when nn_bind returns EADDRINUSE by Bill Williams · 7 days ago master
  2. b60b464 Update rpc_demo.c (#897) by davesliu · 7 days ago
  3. 55b1d86 fixes #886 nn_poll resets EBADF to EOPNOTSUP by Garrett D'Amore · 3 months ago
  4. 5cc0074 Fix nn_getsockopt() docs: EAGAIN -> ETIMEDOUT (#867) by Alexey Rybalchenko · 4 months ago
  5. c1f8ec1 fixes #879 documentation for nn_get_statistic by Garrett D'Amore · 4 months ago

Welcome to nanomsg

Release MIT License Linux Status Windows Status Gitter

The nanomsg library is a simple high-performance implementation of several “scalability protocols”. These scalability protocols are light-weight messaging protocols which can be used to solve a number of very common messaging patterns, such as request/reply, publish/subscribe, surveyor/respondent, and so forth. These protocols can run over a variety of transports such as TCP, UNIX sockets, and even WebSocket.

For more information check the website.


  1. Windows.

    • Windows Vista or newer (Windows XP and 2003 are NOT supported)
    • Microsoft Visual Studio 2010 (including C++) or newer, or mingw-w64 (Specifically mingw and older Microsoft compilers are *NOT supported)
    • CMake 2.8.7 or newer, available in $PATH as cmake
  2. POSIX (Linux, MacOS X, UNIX)

    • ANSI C compiler supporting C89
    • POSIX pthreads (should be present on all modern POSIX systems)
    • BSD sockets support for both TCP and UNIX domain sockets
    • CMake ( 2.8.7 or newer, available in $PATH as cmake
  3. Documentation (optional)

Build it with CMake

  1. Go to the root directory of the local source repository.
  2. To perform an out-of-source build, run:
  3. mkdir build
  4. cd build
  5. cmake .. (You can add -DCMAKE_INSTALL_PREFIX=/usr/local or some other directory.)
  6. cmake --build .
  7. ctest -C Debug .
  8. cmake --build . --target install NB: This may have to be done as a privileged user.
  9. (Linux only). ldconfig (As a privileged or root user.)



Source code:


Bug tracker:

Mailing list:

Gitter Chat:

IRC chatroom: #nanomsg at