Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

nanomsg library

License

NotificationsYou must be signed in to change notification settings

nanomsg/nanomsg

Repository files navigation

ReleaseMIT LicenseLinuxWindowsDarwinDiscord

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

For more information check thewebsite.

Prerequisites

  1. Windows.

    • Windows Vista or newer (Windows XP and 2003 areNOT supported)
    • Microsoft Visual Studio 2010 (including C++) or newer, or mingw-w64.(Specifically mingw and older Microsoft compilers areNOT supported,and we do not test mingw-w64 at all, so YMMV.)
    • CMake 2.8.12 or newer, available in $PATH ascmake
  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 (http://cmake.org) 2.8.12 or newer, available in $PATH ascmake
  3. Documentation (optional)

Quick Build Instructions

These steps here are the minimum steps to get a default Debugbuild. Using CMake you can do many other things, includingsetting additional variables, setting up for static builds, orgeneration project or solution files for different developmentenvironments. Please check the CMake website for all the variousoptions that CMake supports.

POSIX

This assumes you have a shell in the project directory, and havethe cmake and suitable compilers (and any required supporting toolslike linkers or archivers) on your path.

  1. % mkdir build
  2. % cd build
  3. % cmake ..
  4. % cmake --build .
  5. % ctest .
  6. % sudo cmake --build . --target install
  7. % sudo ldconfig (if on Linux)

Windows

This assumes you are in a command or powershell window and havethe appropriate variables setup to support Visual Studio, typicallyby runningvcvarsall.bat or similar with the appropriate argument(s).It also assumes you are in the project directory.

  1. md build
  2. cd build
  3. cmake ..
  4. cmake --build . --config Debug
  5. ctest -C Debug .
  6. cmake --build . --config Debug --target installNB: This may have to be done using an Administrator account.

Alternatively, you can build and install nanomsg usingvcpkg dependency manager:

  1. git clone https://github.com/Microsoft/vcpkg.git
  2. cd vcpkg
  3. ./bootstrap-vcpkg.bat
  4. ./vcpkg integrate install
  5. ./vcpkg install nanomsg

The nanomsg port in vcpkg is kept up to date by microsoft team members and community contributors.If the version is out of date, pleasecreate an issue or pull request on the vcpkg repository.

Static Library

We normally build a dynamic library (.so or .DLL) by default.

If you want a static library (.a or .LIB), configure by passing-DNN_STATIC_LIB=ON to the firstcmake command.

POSIX

POSIX systems will need to link with the libraries normally used when buildingnetwork applications. For some systems this might mean -lnsl or -lsocket.

Windows

You will also need to defineNN_STATIC_LIB in your compilation environmentwhen building programs that use this library. This is required because ofthe way Windows changes symbol names depending on whether the symbols shouldbe exported in a DLL or not.

When using the .LIB on Windows, you will also need to link with thews2_32, mswsock, and advapi32 libraries, as nanomsg depends on them.

Support

This library is considered to be in "sustaining" mode, which means that newfeature development has ended, and bug fixes are made only when strictlynecessary for severe issues.

New development is now occurring in theNNGproject, which offers both protocol and API compatibility with this project.Please consider using NNG for new projects.

Please see the file SUPPORT for more details.


[8]ページ先頭

©2009-2025 Movatter.jp