Code Monkey home page Code Monkey logo

nnanomsg's Introduction

NNanomsg

NNanomsg is a .NET binding for nanomsg. It can be used without recompiling on any platform where .NET is available.

At runtime NNanomsg needs to be able to locate the native nanomsg library for your platform. The following paths are searched (in order) until the native library is found:

 Windows:   [Application Directory]\bin\[x86|x64]
            [Application Directory]\[x86|x64]
            [Application Directory]
            [NNanomsg.dll Directory]\bin\[x86|x64]
            [NNanomsg.dll Directory]\[x86|x64]
            [NNanomsg.dll Directory]

 Posix:     [Application Directory]/bin/[x86|x64]
            [Application Directory]/[x86|x64]
            [Application Directory]
            /usr/local/lib
            /usr/lib

For convenience, we've included nanomsg binaries for Windows (x86 and x64) and Linux (x86 and x64) in the git repository.

Example

A simple C# example is included in the source distribution and you might also want to look at the Test project.

Work in progress...

Usage

NNanomsg actually exposes two API's:

  1. Static methods in the NN class. These match those of the C API very closely.
  2. NanomsgSocket and associated classes which provide a higher level idiomatic .NET interface.

For most applications, the higher level interface should be used.

Development Status

Alpha quality. We're still debating the best way to structure some functionality and parts of the API will likely change.

The current version of NNanomsg requires nanomsg-0.3-beta or greater.

Only tested on linux/mono and Windows/Microsoft CLR.

Building Notes

A Vagrantfile that builds a VM with nanomsg and mono installed which can be used to run the example project is included.

Procedure used for generating shared nanomsg libraries:

Windows x86

 cmake.exe . -G "Visual Studio 12"

then Release build in Visual Studio 2013

Windows x64

 cmake.exe . -G "Visual Studio 12 Win64"

then Release build in Visual Studio 2013

Linux x86/x64

 autoreconf -fi
 ./configure --enable-shared
 make
 make install

.so library is in /usr/local/lib

Primary Contributors

nnanomsg's People

Contributors

mhowlett avatar kwpatrick avatar

Watchers

James Cloos avatar okok avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.