nanomsg library

Overview

Welcome to nanomsg

Release MIT License Linux Status Windows Status Coverage 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.

Prerequisites

  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, and we do not test mingw-w64 at all, so YMMV.)
    • 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 (http://cmake.org) 2.8.7 or newer, available in $PATH as cmake
  3. Documentation (optional)

Quick Build Instructions

These steps here are the minimum steps to get a default Debug build. Using CMake you can do many other things, including setting additional variables, setting up for static builds, or generation project or solution files for different development environments. Please check the CMake website for all the various options that CMake supports.

POSIX

This assumes you have a shell in the project directory, and have the cmake and suitable compilers (and any required supporting tools like 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 have the appropriate variables setup to support Visual Studio, typically by running vcvarsall.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 install NB: This may have to be done using an Administrator account.

Alternatively, you can build and install nanomsg using vcpkg 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, please create 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 first cmake command.

POSIX

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

Windows

You will also need to define NN_STATIC_LIB in your compilation environment when building programs that use this library. This is required because of the way Windows changes symbol names depending on whether the symbols should be exported in a DLL or not.

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

Support

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

New development is now occurring in the NNG project, 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.

Resources

Website: http://nanomsg.org

Source code: https://github.com/nanomsg/nanomsg

Documentation: http://nanomsg.org/documentation.html

Bug tracker: https://github.com/nanomsg/nanomsg/issues

Mailing list: [email protected]

Gitter Chat: https://gitter.im/nanomsg/nanomsg

IRC chatroom: #nanomsg at irc.freenode.net/8001

Issues
  • Change from malloc to calloc

    Change from malloc to calloc

    changes to make sure that the alloced memory block is zero filled, takes a little more time but ALWAYS worth it.. to keep garbage out of the memory block.

    These changes are submitted under the MIT License

    opened by marchon 50
  • Memory leak on nn_send from REQ endpoint

    Memory leak on nn_send from REQ endpoint

    nn_device is seen to fail, where the client will receive 4 bytes too many (probably the request ID) from the server when used over a device.

    Please read down til near the end, to get the full details; the history of messages that led us to this conclusion is -- convoluted.

    Original description (which ultimately led to this bug, below):

    Using req/rep model, on NN_REQ enpoint I send messages with nn_send(..., NN_DONTWAIT) and wait for NN_POLLIN event of nn_poll with dynamic timeout. If nothing recieved, another message can be send after some time (during which the response to the previous can come). If the response really comes, then we have a memory leak. At least, it looks like this. The workaround is call of nn_recv(..., NN_DONTWAIT) just before any nn_send; but it seems strange.

    opened by romanoved 43
  • Providing test to demonstrate hang in nn_close on websocket transport

    Providing test to demonstrate hang in nn_close on websocket transport

    This test demonstrates an occasional hang (at least on Windows) on line 100 when the PUB socket is closed. Creating PR in order to kick off automated builds on other platforms to see if they fail here as well, or if it is limited to just Windows.

    This only appears to hang on the WebSocket transport. This could be just a problem with the WebSocket transport implementation (the most likely scenario), or it could be because the WebSocket transport incidentally requires more time to connect and perhaps disconnect sockets, as compared to say TCP, and is thus more likely to trigger a race condition.

    opened by JackDunaway 41
  • Nanomsg an order of magnitude slower than zmq

    Nanomsg an order of magnitude slower than zmq

    I thought nanomsg is supposed to be faster than zmq, but when I tested on my Thinkpad W520 running Centos6.4, I was very surprised to find out that it was an order of magnitude slower.

    Here is my program:

    #include "../src/nn.h"
    #include "../src/pair.h"
    #include <cstdio>
    #include <unistd.h>
    #include <cstring>
    #include <cassert>
    #include <pthread.h>
    #include <sys/time.h>
    
    void* Send(void* context)
    {
        int responder = nn_socket(AF_SP, NN_PAIR);
        assert(responder != -1);
        int rc = nn_connect(responder, "inproc://test");
        assert(rc >= 0);
    
        char buf[1024];
        unsigned long bytes = 0;
        int sz[] = { 16,32,64,96,128,160,192,224,256,384,512,768,1024};
        int p =0;
        for (unsigned count = 1048576; count--;)
        {
        unsigned len = sz[p];
            nn_send(responder, buf, len, 0);
        bytes += len;
        p = (p+1) % (sizeof(sz)/sizeof(sz[0]));
        }
        nn_send(responder, buf, 0, 0);
        printf("sent %lu bytes\n", bytes);
        nn_close(responder);
        return NULL;
    }
    
    
    void* Receive(void* arg)
    {
        int receiver = (long)arg;
        char buf[1024];
        unsigned long bytes = 0;
        while (1)
        {
            int len = nn_recv(receiver, buf, sizeof(buf), 0);
        if (!len)
            break;
        if (len < 0)
        {
            perror("zmq_recv");
            break;
        }
        bytes += len;
        }
        printf("received %lu bytes\n", bytes);
        return NULL;
    }
    
    int main ()
    {
        int receiver = nn_socket(AF_SP, NN_PAIR);
        assert(receiver != -1);
        int rc = nn_bind(receiver, "inproc://test");
        assert(rc >= 0);
    
        struct timeval tv;
        gettimeofday(&tv, NULL);
        unsigned long t0 = tv.tv_usec + tv.tv_sec * 1000000;
    
        pthread_t th;
        pthread_create(&th, NULL, Receive, (void*)receiver);
        Send(NULL);
        void* ret;
        pthread_join(th, &ret);
    
        gettimeofday(&tv, NULL);
        unsigned long t = tv.tv_usec + tv.tv_sec * 1000000 - t0;
        printf("elapsed=%.3f\n", t/1000000.);
        return 0;
    }
    

    On my Thinkpad W520, it takes about 3.6-4.3s to run; whereas a similar version using zmq only took 0.4s. Can someone please point out what I did wrong? Thanks!

    opened by wuz73 37
  • Mac OS X: assertion failed (aio_posix.inc)

    Mac OS X: assertion failed (aio_posix.inc)

    I have written a small echo client/server example in LuaJIT. It runs fine on Linux but on OS X I sometimes have the following error on the client side:

    Assertion failed: errno == ECONNRESET || errno == ETIMEDOUT || errno == EPIPE (/[...]/nanomsg/src/utils/aio_posix.inc:779)
    Abort trap: 6
    

    The error occurs on that line (nn_recv).

    opened by catwell 36
  • assertion failure (NN_QUEUE_NOTINQUEUE)

    assertion failure (NN_QUEUE_NOTINQUEUE)

    Assertion failed: self->next == NN_QUEUE_NOTINQUEUE (/home/mike/nanomsg/src/utils/queue.c:78)

    Program received signal SIGABRT, Aborted. [Switching to Thread 0x7ffff1e37700 (LWP 2527)] 0x00007ffff707f425 in __GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff707f425 in __GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007ffff7082b8b in __GI_abort () at abort.c:91 #2 0x00007ffff795d379 in nn_err_abort () from /usr/local/lib/libnanomsg.so.0.0.0 #3 0x00007ffff795e3ec in nn_queue_item_term () from /usr/local/lib/libnanomsg.so.0.0.0 #4 0x00007ffff795bf9f in nn_worker_task_term () from /usr/local/lib/libnanomsg.so.0.0.0 #5 0x00007ffff7959457 in nn_usock_term () from /usr/local/lib/libnanomsg.so.0.0.0 #6 0x00007ffff796af36 in nn_aipc_term () from /usr/local/lib/libnanomsg.so.0.0.0 #7 0x00007ffff796bceb in nn_bipc_handler () from /usr/local/lib/libnanomsg.so.0.0.0 #8 0x00007ffff795789e in nn_fsm_event_process () from /usr/local/lib/libnanomsg.so.0.0.0 #9 0x00007ffff795763b in nn_ctx_leave () from /usr/local/lib/libnanomsg.so.0.0.0 #10 0x00007ffff795c53f in nn_worker_routine () from /usr/local/lib/libnanomsg.so.0.0.0 #11 0x00007ffff795e8d4 in nn_thread_main_routine () from /usr/local/lib/libnanomsg.so.0.0.0 #12 0x00007ffff56efe9a in start_thread (arg=0x7ffff1e37700) at pthread_create.c:308 #13 0x00007ffff713cccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #14 0x0000000000000000 in ?? ()

    (gdb)

    on another thread: Assertion failed: 0 (/home/mike/nanomsg/src/transports/utils/streamhdr.c:284)

    Program received signal SIGABRT, Aborted. [Switching to Thread 0x7ffff1e37700 (LWP 2533)] 0x00007ffff707f425 in __GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff707f425 in __GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007ffff7082b8b in __GI_abort () at abort.c:91 #2 0x00007ffff795d379 in nn_err_abort () from /usr/local/lib/libnanomsg.so.0.0.0 #3 0x00007ffff7968962 in nn_streamhdr_handler () from /usr/local/lib/libnanomsg.so.0.0.0 #4 0x00007ffff795789e in nn_fsm_event_process () from /usr/local/lib/libnanomsg.so.0.0.0 #5 0x00007ffff795763b in nn_ctx_leave () from /usr/local/lib/libnanomsg.so.0.0.0 #6 0x00007ffff795c53f in nn_worker_routine () from /usr/local/lib/libnanomsg.so.0.0.0 #7 0x00007ffff795e8d4 in nn_thread_main_routine () from /usr/local/lib/libnanomsg.so.0.0.0 #8 0x00007ffff56efe9a in start_thread (arg=0x7ffff1e37700) at pthread_create.c:308 #9 0x00007ffff713cccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #10 0x0000000000000000 in ?? ()

    (gdb)

    another: Assertion failed: self->next == NN_QUEUE_NOTINQUEUE (/home/mike/nanomsg/src/utils/queue.c:78)

    Program received signal SIGABRT, Aborted. [Switching to Thread 0x7ffff1e37700 (LWP 2539)] 0x00007ffff707f425 in __GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff707f425 in __GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007ffff7082b8b in __GI_abort () at abort.c:91 #2 0x00007ffff795d379 in nn_err_abort () from /usr/local/lib/libnanomsg.so.0.0.0 #3 0x00007ffff795e3ec in nn_queue_item_term () from /usr/local/lib/libnanomsg.so.0.0.0 #4 0x00007ffff795bf9f in nn_worker_task_term () from /usr/local/lib/libnanomsg.so.0.0.0 #5 0x00007ffff7959457 in nn_usock_term () from /usr/local/lib/libnanomsg.so.0.0.0 #6 0x00007ffff796af36 in nn_aipc_term () from /usr/local/lib/libnanomsg.so.0.0.0 #7 0x00007ffff796bceb in nn_bipc_handler () from /usr/local/lib/libnanomsg.so.0.0.0 #8 0x00007ffff795789e in nn_fsm_event_process () from /usr/local/lib/libnanomsg.so.0.0.0 #9 0x00007ffff795763b in nn_ctx_leave () from /usr/local/lib/libnanomsg.so.0.0.0 #10 0x00007ffff795c53f in nn_worker_routine () from /usr/local/lib/libnanomsg.so.0.0.0 #11 0x00007ffff795e8d4 in nn_thread_main_routine () from /usr/local/lib/libnanomsg.so.0.0.0 #12 0x00007ffff56efe9a in start_thread (arg=0x7ffff1e37700) at pthread_create.c:308 #13 0x00007ffff713cccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #14 0x0000000000000000 in ?? ()

    (gdb)

    code:

    int main(int argc, char *argv[]) { void *data = NULL; int r_len = 0; int timeout = 1000; unsigned char *s_data = NULL; int s_len = 0; int s; int a; int len; int _time=time(0); int i; int found_command=0; char file[1024]; char ipc[1024]; int ipc_num = 0;

    if (argc > 1) {
        ipc_num = atoi(argv[1]) + 1;
    } else ipc_num = 1;
    
    if (strstr(argv[0], "curl") || strstr(argv[0], "adreplace")) {
        sprintf(file, "/tmp/curl%d.ipc", ipc_num);
        sprintf(ipc, "ipc:///tmp/curl%d.ipc", ipc_num);
    
    } else {
        sprintf(file, "/tmp/adserver%d.ipc", ipc_num);
        sprintf(ipc, "ipc:///tmp/adserver%d.ipc", ipc_num);
    }
    
    // initialize mysql
    init();
    //mysql_reopen();
    s = nn_socket(AF_SP, NN_REP);
    nn_setsockopt(s, NN_SOL_SOCKET, NN_RCVTIMEO, &timeout, sizeof(timeout));
    nn_setsockopt(s, NN_SOL_SOCKET, NN_SNDTIMEO, &timeout, sizeof(timeout));
    a = nn_bind(s, ipc);
    chmod(file, 0777);
    
    printf("Bound to IPC: %s\n", ipc);
    
    _time = time(0);
    while (1) {
    
        s_len = 0;
        s_data = NULL;
        found_command=0;
    
        len = nn_recv(s, &data, NN_MSG, 0);
    

    // if (len) { if (data && ((unsigned)len >= (unsigned)sizeof(NanoPkt))) { // do whatever with data here... always be sure to set s_data, and s_len NanoPkt _pkthdr = (NanoPkt *)data; printf("NN recv len %d nanopkt cmd %d nanopkt len %d - %d %d %d\n", len, pkthdr->type, pkthdr->len, sizeof(Genreplace_Req), sizeof(Findrep_Req), sizeof(Final_Req)); for (i = 0; Commands[i].func != NULL; i++) { if (pkthdr->type == Commands[i].type) { (_Commands[i].func)((unsigned char *)data, len, &s_data, &s_len); found_command=1; break; } }

            printf("FOund command: %d\n", found_command);
    
            // just in case something went wrong.. we have to return something or we will force a stall
            if (s_data == NULL || !s_len) {
                //printf("sending null\n");
                nn_send(s, "NULL", 4, 0);
            } else {
                //printf("sending %d bytes of real data %p\n", s_len, s_data);
                nn_send(s, s_data, s_len, 0);
    

    // free(s_data); } // nn_freemsg(data); data = NULL; }

        if ((time(0) - _time) > 10) {
            _time = time(0);
            removerep();
        }
    

    // }

    }
    nn_close(s);
    

    }

    client: if ((reqptr = (Genreplace_Req *)malloc(sizeof(Genreplace_Req) + 1)) == NULL) return NULL; memset(reqptr, 0, sizeof(Genreplace_Req)); reqptr->addr = ip; reqptr->addr2 = addr2; reqptr->width = width; reqptr->height = height; // memcpy(&reqptr->ip, straddr, 15); // memcpy(&reqptr->iso, iso, 3);

    pkt = (void *)nanopkt(GENREPLACE_REQ, &rep_len, reqptr, sizeof(Genreplace_Req));
    

    nanopkt: char *nanopkt(int type, int *_len, void *extra, int extra_size) { NanoPkt *pkthdr; char *ret = NULL; int msg_sock = 0; int len = 0; void *data = NULL; void *out_data = NULL; int out_size = 0; char *ptr; int value=1000; int prio=1; char ipc[1024];

    out_data = (void *)malloc(sizeof(NanoPkt) + extra_size + 1);
    ptr = (char *)out_data;
    pkthdr = (NanoPkt *)ptr;
    ptr += sizeof(NanoPkt);
    
    pkthdr->type = type;
    pkthdr->len = sizeof(NanoPkt) + extra_size;
    
    if (extra_size) {
        memcpy(ptr, extra, extra_size);
        ptr += extra_size;
    }
    
    out_size = sizeof(NanoPkt) + extra_size;
    
    if ((msg_sock = nn_socket(AF_SP, NN_REQ)) < 0) goto end;
    //nn_setsockopt(msg_sock, NN_SOL_SOCKET, NN_RCVTIMEO, &value, sizeof(value));
    //nn_setsockopt(msg_sock, NN_SOL_SOCKET, NN_SNDTIMEO, &value, sizeof(value));
    for (prio = 1; prio < 5; prio++) {
        sprintf(ipc, "ipc:///tmp/%s%d.ipc", (type==ADREPLACE_REQ) ? "curl" : "adserver",    prio);
        nn_setsockopt (msg_sock, NN_SOL_SOCKET, NN_SNDPRIO, &prio, sizeof (int));
        nn_connect(msg_sock, ipc);
    }
    

    // if (nn_connect(msg_sock, "ipc:///tmp/adserver0.ipc") < 0) goto end; // doconnect(msg_sock,10); if (nn_send(msg_sock, out_data, out_size, 0) < 0) goto end;

    len = nn_recv(msg_sock, &data, NN_MSG, 0);
    
    *_len = len;
    
    if (data && len) {
        ret = malloc(len + 1);
        if (ret == NULL) return NULL; // fatal should exit...
        memcpy(ret, data, len);
        nn_freemsg(data);
    }
    

    end:; if (msg_sock) nn_close(msg_sock); return ret; }

    opened by mikeguidry 32
  • fixes #502 Assertion or Access Violation when calling nn_close while nn_recv blocks in separate thread

    fixes #502 Assertion or Access Violation when calling nn_close while nn_recv blocks in separate thread

    This PR replaces #502 by splitting out the test from tcp_shutdown into a new test called async_shutdown

    Again, for clarity, this PR fixes one type of bug on Windows, but then exposes a new failure mode downstream. The test -- but not the fix -- might expose further issues on *NIX systems.

    opened by JackDunaway 31
  • Receiving up published messages

    Receiving up published messages

    This seems to be affecting both C and Go code. The sender on the Pub side uses a scatter array from the C library with nn_sendmsg. The sub side was receiving using nn_recv. The data comes in, but there seems to be a constant memory leak when receiving packets. I was trying to convert over to nn_recvmsg, but I'm having a bit of trouble trying to setup to pull all data including hdr.msg_control data to make sure I clear the buffers. Opendns is blocking nanomsg.org, so I'm having a hard time with this at work. I can get data off the packets with nn_recvmsg, but I still leak memory and that is where I was trying to pull control data as well. In all cases, the receiver is making sure to empty the receive queue, but leaks still occur.

    opened by BillMcCroskey 30
  • Doesn't build on Windows with CMake + mingw32

    Doesn't build on Windows with CMake + mingw32

    Here are the steps performed to reproduce the issue (version 0.4 beta):

    1. Lunch CMake-gui, Configure, select 'MinGW Makefiles', specify native compiler for C by pointing to the path of gcc, Generate. OK
    2. Go the build directory (I created a sub-dir named build), lunch mingw32-make, error:
    Z:\sp\Dropbox\Prj\repo\nanomsg\__build\src\nanomsg-0.4-beta\build>mingw32-make
    Scanning dependencies of target nanomsg
    [  1%] Building C object src/CMakeFiles/nanomsg.dir/core/ep.c.obj
    In file included from Z:\sp\Dropbox\Prj\repo\nanomsg\__build\src\nanomsg-0.4-beta\src\core\../aio/../utils/mutex.h:27:0,
                     from Z:\sp\Dropbox\Prj\repo\nanomsg\__build\src\nanomsg-0.4-beta\src\core\../aio/ctx.h:26,
                     from Z:\sp\Dropbox\Prj\repo\nanomsg\__build\src\nanomsg-0.4-beta\src\core\sock.h:29,
                     from Z:\sp\Dropbox\Prj\repo\nanomsg\__build\src\nanomsg-0.4-beta\src\core\ep.c:27:
    Z:\sp\Dropbox\Prj\repo\nanomsg\__build\src\nanomsg-0.4-beta\src\core\../aio/../utils/win.h:38:5: error: unknown type name 'ADDRESS_FAMILY'
         ADDRESS_FAMILY sun_family;
         ^
    Z:\sp\Dropbox\Prj\repo\nanomsg\__build\src\nanomsg-0.4-beta\src\core\../aio/../utils/win.h:40:17: error: 'ADDRESS_FAMILY' undeclared here (not in a function)
             sizeof (ADDRESS_FAMILY)];
                     ^
    src\CMakeFiles\nanomsg.dir\build.make:53: recipe for target 'src/CMakeFiles/nanomsg.dir/core/ep.c.obj' failed
    mingw32-make[2]: *** [src/CMakeFiles/nanomsg.dir/core/ep.c.obj] Error 1
    CMakeFiles\Makefile2:1334: recipe for target 'src/CMakeFiles/nanomsg.dir/all' failed
    mingw32-make[1]: *** [src/CMakeFiles/nanomsg.dir/all] Error 2
    Makefile:146: recipe for target 'all' failed
    mingw32-make: *** [all] Error 2
    
    opened by stepelu 30
  • NN_QUEUE_NOTINQUEUE fix incomplete

    NN_QUEUE_NOTINQUEUE fix incomplete

    Just saw this on Travis:

    Assertion failed: self->next == NN_QUEUE_NOTINQUEUE (../src/utils/queue.c:102) /bin/bash: line 5: 13356 Aborted (core dumped) ${dir}$tst

    Arrgh. This was the ipc_shutdown test.

    release-stopper 
    opened by gdamore 29
  • ws.c test periodically hangs

    ws.c test periodically hangs

    This issue is to continue a conversation first started from a pull request: https://github.com/nanomsg/nanomsg/pull/503#issuecomment-153775151

    @gdamore writes: "I think the windows code is particularly fragile... I have some theories here, but it seems like some tests trash the stack. The tcp_shutdown test was particularly hard here; once it failed it left the stack in a state that even other tests would fail subsequently."

    Can you elaborate on this?

    opened by JackDunaway 26
  • when I use NETLINK_CONNECTOR,somthing was wrong

    when I use NETLINK_CONNECTOR,somthing was wrong

    I want to use netlink to listen for process exit event。I found that REP/REQ can't work

    `static int nl_connect() { int rc; int nl_sock; struct sockaddr_nl sa_nl;

    nl_sock = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR);
    if (nl_sock == -1) {
        perror("socket");
        return -1;
    }
    
    sa_nl.nl_family = AF_NETLINK;
    sa_nl.nl_groups = CN_IDX_PROC;
    sa_nl.nl_pad = 0;
    sa_nl.nl_pid = getpid();
    
    rc = bind(nl_sock, (struct sockaddr *)&sa_nl, sizeof(sa_nl));
    if (rc == -1) {
        perror("bind");
        close(nl_sock);
        return -1;
    }
    
    return nl_sock;
    

    } \

    void* nng_rep_listen(char *s, int tnum, int rcv_max_size, int (*recv)(char *in, int isize, char **out, int *osize, int err)) { int ret = -1;

    sthrdinfo_t* info = (sthrdinfo_t*)malloc(sizeof(sthrdinfo_t));
    memset(info, 0, sizeof(sthrdinfo_t));
    
    nng_listener listener;
    info->recv = recv;
    
    if ((ret = nng_rep0_open(&(info->sock))) != 0) {
        printf("nng_rep0_open :%d\n", ret);
        return NULL;
    }
    
    if ((ret = nng_listener_create(&listener, info->sock, s)) != 0) {
        printf("nng_listener_create :%d\n", ret);
        return NULL;
    }
    
    nng_setopt_ms(info->sock, NNG_OPT_REQ_RESENDTIME, 2000);
    nng_setopt_ms(info->sock, NNG_OPT_RECVMAXSZ, rcv_max_size);
    
    nng_listener_start(listener, 0);
    
    pthread_create(&(info->tid), NULL, sw_nng_rep_listen_proc, (void*)info);
    pthread_detach(info->tid);
    
    return info;
    

    }

    int nng_req_sendto(char *s, int to, char *in, int isize, char **out, int *osize) { int ret = -1; nng_socket sock; nng_dialer dialer;

    if ((ret = nng_req0_open(&sock)) != 0) {
        printf("nng_req0_open :%d\n", ret);
        goto END;
    }
    
    if ((ret = nng_dialer_create(&dialer, sock, s)) != 0) {
        printf("nng_dialer_create :%d\n",ret);
        goto END;
    }
    
    nng_setopt_ms(sock, NNG_OPT_REQ_RESENDTIME, 2000);
    
    nng_dialer_start(dialer, NNG_FLAG_NONBLOCK);
    
    if ((ret = nng_send(sock, in, isize, 0)) != 0) {
        printf("nng_send :%d\n",ret);
        goto END;
    }
    
    if ((ret = nng_recv(sock, out, osize, NNG_FLAG_ALLOC)) != 0) {
        printf("nng_recv :%d\n",ret);
        goto END;
    }
    

    END: nng_close(sock); return ret; } `

    opened by chuanqi723 0
  • Bad file descriptor [9]

    Bad file descriptor [9]

    /home/root/application/latest/lib64/libnanomsg.so.5(nn_efd_signal+0x44)[0x7fae3938b4] /home/root/application/latest/lib64/libnanomsg.so.5(+0x121e4)[0x7fae38e1e4] /home/root/application/latest/lib64/libnanomsg.so.5(nn_ctx_leave+0x3c)[0x7fae38fa34] /home/root/application/latest/lib64/libnanomsg.so.5(+0x16930)[0x7fae392930] /home/root/application/latest/lib64/libnanomsg.so.5(+0x18ecc)[0x7fae394ecc] /home/root/application/latest/lib/libpthread.so.0(+0x77ac)[0x7fadb707ac] /lib/libc.so.6(+0xda70c)[0x7fad85d70c] Bad file descriptor [9] (/home/work/nanomsg/nanomsg-1.1.5/src/utils/efd_eventfd.inc:78)

    This error caused my program crash

    opened by CYuSir 0
  • pkg-config file is broken when CMAKE_INSTALL_LIBDIR is absolute

    pkg-config file is broken when CMAKE_INSTALL_LIBDIR is absolute

    As per title: src/pkgconfig.in has

    [email protected][email protected]
    exec_prefix=${prefix}
    includedir=${prefix}/include
    libdir=${prefix}/@[email protected]
    

    and so can’t handle absolute paths in CMAKE_INSTALL_LIBDIR. This leads to broken .pc files on NixOS in particular. (Deriving libdir from prefix and not exec_prefix is also a bit suspect, but not the issue here.)

    See “Concatenating paths when building pkg-config files” for a thorough discussion of the problem and a suggested fix, or KDE’s extra-cmake-modules for a simpler approach.

    opened by alexshpilkin 0
  • Nanomsg gives signal 6 abort during fetching from couchbase

    Nanomsg gives signal 6 abort during fetching from couchbase

    Hi, I am getting a signal 6 error when i am trying to fetch data from couchbase, this occurs at erratic intervals. I am using version 1.1 and from the code i can see if poll returns value less than 0, errno_assert is being triggered which crashes the application with signal 6. Below is the backtrace of nanomsg thread:

    Program terminated with signal 6, Aborted. #0 0x00007ffff4c74a33 in select () from /usr/lib64/libc.so.6 Missing separate debuginfos, use: debuginfo-install boost-system-1.53.0-28.el7.x86_64 cyrus-sasl-lib-2.1.26-23.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-50.el7.x86_64 libcom_err-1.42.9-19.el7.x86_64 libcurl-7.29.0-59.el7_9.1.x86_64 libidn-1.28-4.el7.x86_64 libselinux-2.5-15.el7.x86_64 libssh2-1.8.0-4.el7.x86_64 nspr-4.32.0-1.el7_9.x86_64 nss-3.53.1-3.el7_9.x86_64 nss-util-3.67.0-1.el7_9.x86_64 openldap-2.4.44-22.el7.x86_64 openssl-libs-1.0.2k-21.el7_9.x86_64 pcre-8.32-17.el7.x86_64 zlib-1.2.7-19.el7_9.x86_64 (gdb) thread 18 [Switching to thread 18 (Thread 0x7fffcef74700 (LWP 40630))] #0 0x00007ffff4bfce00 in _IO_cleanup () from /usr/lib64/libc.so.6 (gdb) bt full #0 0x00007ffff4bfce00 in _IO_cleanup () from /usr/lib64/libc.so.6 No symbol table info available. #1 0x00007ffff4bb6be5 in abort () from /usr/lib64/libc.so.6 No symbol table info available. #2 0x00000000009ff371 in nn_err_abort () No symbol table info available. #3 0x00000000009ff2cd in nn_efd_wait () No symbol table info available. #4 0x00000000009fbb13 in nn_sock_recv () No symbol table info available. #5 0x00000000009f95fa in nn_recvmsg () No symbol table info available. #6 0x00000000009f9015 in nn_recv () No symbol table info available. #7 0x000000000099b8c9 in vcmNpsIcmMsgRecv () No symbol table info available. #8 0x0000000000975a57 in __vcmNpsIcmRecv () No symbol table info available. #9 0x00000000007261f5 in vcmDpeEmaIcmStatsCb(void*) () No symbol table info available. #10 0x000000000099a54b in vcmNpsIcmInterfaceCreate () No symbol table info available. #11 0x000000000095b1c0 in ?? () No symbol table info available. #12 0x00007ffff7250ea5 in start_thread (arg=0x7fffcef74700) at pthread_create.c:307 __res = pd = 0x7fffcef74700 now = unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736665700096, -1738215837302118578, 0, 33558528, 0, 140736665700096, 1738108024908031822, 1738235171653297998}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = pagesize_m1 = ---Type to continue, or q to quit--- sp = freesize = #13 0x00007ffff4c7d9fd in clone () from /usr/lib64/libc.so.6 This is present in one of our stdout files: Invalid argument [22] (home/3rd-party/nanomsg/src/utils/efd.c:91)

    Code:: 88 rc = poll (&pfd, 1, timeout); 89 if (nn_slow (rc < 0 && errno == EINTR)) 90 return -EINTR; 91 errno_assert (rc >= 0);

    I found that in version 1.2, this errno_assert is not present in the code, Can this errno_assert be safely removed from our code without updating the nanomsg version . Please help.

    opened by aryanjain 1
  • nn_closefd nn_err_abort

    nn_closefd nn_err_abort

    please help me: Occasionally encounter exceptions in my project that cause the program to crash,gdb debugging information is as follows: #0 0x0000007f9e375378 in raise () from /lib/libc.so.6​ No symbol table info available.​ #1 0x0000007f9e3639c0 in abort () from /lib/libc.so.6​ No symbol table info available.​ #2 0x0000007f9e07ba78 in nn_err_abort ()​ at /home/iotbuild/DockerUb1804_jenkinsWork/workspace/PRE_rk356x_linux_T8030/env/app/baize_platform/baize_app/third_usage/nanomsg/nanomsg-1.1.5/src/utils/err.c:56​ No locals.​ #3 0x0000007f9e07b524 in nn_closefd (fd=0)​ at /home/iotbuild/DockerUb1804_jenkinsWork/workspace/PRE_rk356x_linux_T8030/env/app/baize_platform/baize_app/third_usage/nanomsg/nanomsg-1.1.5/src/utils/closefd.c:41​ rc = -1​ #4 0x0000007f9e078b18 in nn_usock_handler (self=0x7f7400ad88, src=1, type=1, srcptr=0x7f7400adf8)​ at /home/iotbuild/DockerUb1804_jenkinsWork/workspace/PRE_rk356x_linux_T8030/env/app/baize_platform/baize_app/third_usage/nanomsg/nanomsg-1.1.5/src/aio/usock_posix.inc:811​ rc = -104​ usock = 0x7f7400ad88​ s = 127​ sz = 9​ sockerr = 127​ #5 0x0000007f9e0751fc in nn_fsm_feed (self=0x7f7400ad88, src=1, type=1, srcptr=0x7f7400adf8)​ at /home/iotbuild/DockerUb1804_jenkinsWork/workspace/PRE_rk356x_linux_T8030/env/app/baize_platform/baize_app/third_usage/nanomsg/nanomsg-1.1.5/src/aio/fsm.c:83​ No locals.​ #6 0x0000007f9e07a5fc in nn_worker_routine (arg=0x7f9e0c5460 <self+32>)​ at /home/iotbuild/DockerUb1804_jenkinsWork/workspace/PRE_rk356x_linux_T8030/env/app/baize_platform/baize_app/third_usage/nanomsg/nanomsg-1.1.5/src/aio/worker_posix.inc:248​ rc = 0​ self = 0x7f9e0c5460 <self+32>​ pevent = 1​ phndl = 0x7f7400ae08​ thndl = 0x7f7c003f60​ tasks = {head = 0x0, tail = 0x0}​ item = 0x0​ task = 0x7f7c003de8​ fd = 0x7f7400adf8​ timer = 0x7f7c003f58​ #7 0x0000007f9e07db18 in nn_thread_main_routine (arg=0x7f9e0c56d8 <self+664>)​ at /home/iotbuild/DockerUb1804_jenkinsWork/workspace/PRE_rk356x_linux_T8030/env/app/baize_platform/baize_app/third_usage/nanomsg/nanomsg-1.1.5/src/uti--Type for more, q to quit, c to continue without paging--c​ ls/thread_posix.inc:35​ self = 0x7f9e0c56d8 <self+664>​ #8 0x0000007f9e3086d0 in start_thread () from /lib/libpthread.so.0​ No symbol table info available.​ #9 0x0000007f9e40c6cc in thread_start () from /lib/libc.so.6​ No symbol table info available.

    opened by ltwan 1
Releases(1.2)
  • 1.2(Apr 18, 2022)

    This adds support for IPv6 and fixes a couple of bugs.

    Please remember that this project is in sustaining mode only, so some bugs remain unfixed.

    Source code(tar.gz)
    Source code(zip)
  • 1.1.5(Oct 15, 2018)

    This release is a minor bug fix release, and includes some improvements to the CMake logic that should make incorporating nanomsg into larger projects easier.

    Source code(tar.gz)
    Source code(zip)
  • 1.1.4(Jun 8, 2018)

    This release is primarily a bug-fix release for Windows platforms, but it also adds support for building on Android.

    The main change in this release is a fix for the IPC transport on Windows, which was subject to crashing if the remote peer breaks messages into smaller pieces. As some other SP implementations do this to avoid data copies, this fix is very important.

    A fix for leaking handles on Windows is included.

    Support for compilation on Android using the NDK and the bundled cmake and toolchain file from Android is now present.

    Source code(tar.gz)
    Source code(zip)
  • 1.1.3(May 23, 2018)

    This is the last planned release for nanomsg. (New effort is focued on the NNG project -- see github.com/nanomsg/nng for details.)

    The following changes are present:

    • CMake exported target, easing inclusion in larger projects (see demos/CMakeLists.txt for an example)
    • Windows no longer uses a single fixed TCP port for eventfd (this should improve reliability)
    • Fix for an assertion failure in efd_unsignal
    • The ABI version is separate from the library version now.
    • Fixed a crash when calling nn_term without first opening a socket.
    • Fix for building Windows tests on case-sensitive file systems.
    • CI/CD improvements: switch to CircleCI, and use CodeCov for coverage analysis.

    Please let us know if there are any significant problems with this release; thanks!

    Source code(tar.gz)
    Source code(zip)
  • 1.1.2(Nov 7, 2017)

  • 1.1.1(Nov 6, 2017)

    ** THIS RELEASE HAS A COMPILE BUG ON LINUX. Use 1.1.2 INSTEAD **

    This is a bug fix release for 1.1.0.

    Two main issues are resolved:

    • nanomsg no longer wakes up every 100 msec even when no I/O is pending

      Some users noticed that nanomsg was performing wakeups regardless of whether I/O was available or not. This had a detrimental effect on power usage.

    • nanomsg no longer crashes when accept fails on Windows

      In some circumstances an outstanding accept() operation that got aborted (for example due to the socket closing) could wind up crashing the application. This was a race, and it is closed now.

    We also fixed a few compilation warnings on Windows.

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Oct 18, 2017)

    This release is primarily a bug fix release for nanomsg, and rolls up a number of stability improvements, particularly for the inproc transport. A port to support Windows Subsystem for Linux is provided as well. There are no changes to the ABI.

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0-rc1(Oct 13, 2017)

    This is the first release candidate of 1.1.0. This release is primarily a bug fix release for nanomsg, and rolls up a number of stability improvements, particularly for the inproc transport. A port to support Windows Subsystem for Linux is provided as well. There are no changes to the ABI.

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Jun 10, 2016)

    This is the first production release of nanomsg. We consider that this version is stable and suitable for use in production by all nanomsg users.

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0-rc2(Jun 7, 2016)

    This corrects (we hope) the problem of "Unknown" versions being reported when building out of source. It also corrects building on systems using MSys2, and adds a few demo programs to the source tree that developers may find useful.

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0-rc1(Jun 3, 2016)

    This is the first release candidate for 1.0.0.

    The changes in this release from earlier releases include:

    • cmake is now mandatory (but a configure wrapper script is present to help)
    • nn_bind() performs the bind() and listen() synchronously (accept is async still) reporting errors back to the caller
    • a new socket option, NN_MAXTTL, is available to configure the maximum "hops" a message may go through before it is dropped (each device traversal is a hop). This is enforced for REP and RESPONDENT protocols, breaking loops.
    • Because cmake doesn't do it automatically, Linux users may need to run ldconfig manually to update the ld.so cache.

    The ABI is the same as v0.9 - 5.0.0.

    At this point we are not expecting to make any code changes prior to the 1.0.0 production release. We are contemplating release of binary packages for Windows, MacOS X, and both RedHat and Debian on x86. We hope that this is the very last release of nanomsg before the production 1.0.0 release.

    Source code(tar.gz)
    Source code(zip)
  • 0.9-beta(May 16, 2016)

Owner
nanomsg
Nanomsg Project
nanomsg
Cap'n Proto serialization/RPC system - core tools and C++ library

Cap'n Proto is an insanely fast data interchange format and capability-based RPC system. Think JSON, except binary. Or think Protocol Buffers, except

Cap'n Proto 9.1k Aug 11, 2022
rpclib is a modern C++ msgpack-RPC server and client library

rpclib rpclib is a RPC library for C++, providing both a client and server implementation. It is built using modern C++14, and as such, requires a rec

null 1.3k Aug 4, 2022
nanomsg library

Welcome to nanomsg The nanomsg library is a simple high-performance implementation of several "scalability protocols". These scalability protocols are

nanomsg 5.5k Aug 9, 2022
nanomsg-next-generation -- light-weight brokerless messaging

nng - nanomsg-next-gen ℹ️ If you are looking for the legacy version of nanomsg, please see the nanomsg repository. This project is a rewrite of the Sc

nanomsg 2.8k Aug 4, 2022
SSD1306 library and simple graphics core library based on Adafruit GFX Library.

Raspberry Pico SSD1306 + GFX Library Based on Adafruit GFX Library https://github.com/adafruit/Adafruit-GFX-Library Usage Hardware Connect your SSD130

Marcin Bober 29 Jul 27, 2022
This library provides a cross-platform image loading library in C11 for projects based on our foundation library

Image Library - Public Domain This library provides a cross-platform image loading library in C11 for projects based on our foundation library.

Mattias Jansson 1 Jan 29, 2022
The dgSPARSE Library (Deep Graph Sparse Library) is a high performance library for sparse kernel acceleration on GPUs based on CUDA.

dgSPARSE Library Introdution The dgSPARSE Library (Deep Graph Sparse Library) is a high performance library for sparse kernel acceleration on GPUs bas

dgSPARSE 53 Aug 9, 2022
C-based/Cached/Core Computer Vision Library, A Modern Computer Vision Library

Build Status Travis CI VM: Linux x64: Raspberry Pi 3: Jetson TX2: Backstory I set to build ccv with a minimalism inspiration. That was back in 2010, o

Liu Liu 6.9k Aug 10, 2022
A simple header-only C++ argument parser library. Supposed to be flexible and powerful, and attempts to be compatible with the functionality of the Python standard argparse library (though not necessarily the API).

args Note that this library is essentially in maintenance mode. I haven't had the time to work on it or give it the love that it deserves. I'm not add

Taylor C. Richberger 992 Aug 5, 2022
Bolt is a C++ template library optimized for GPUs. Bolt provides high-performance library implementations for common algorithms such as scan, reduce, transform, and sort.

Bolt is a C++ template library optimized for heterogeneous computing. Bolt is designed to provide high-performance library implementations for common

null 355 Jun 27, 2022
oneAPI DPC++ Library (oneDPL) https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/dpc-library.html

oneAPI DPC++ Library (oneDPL) The oneAPI DPC++ Library (oneDPL) aims to work with the oneAPI DPC++ Compiler to provide high-productivity APIs to devel

oneAPI-SRC 632 Aug 7, 2022
C-based/Cached/Core Computer Vision Library, A Modern Computer Vision Library

Build Status Travis CI VM: Linux x64: Raspberry Pi 3: Jetson TX2: Backstory I set to build ccv with a minimalism inspiration. That was back in 2010, o

Liu Liu 6.9k Aug 6, 2022
MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).

MIRACL What is MIRACL? Multiprecision Integer and Rational Arithmetic Cryptographic Library – the MIRACL Crypto SDK – is a C software library that is

MIRACL 491 Aug 5, 2022
Mongoose Embedded Web Server Library - a multi-protocol embedded networking library with TCP/UDP, HTTP, WebSocket, MQTT built-in protocols, async DNS resolver, and non-blocking API.

Mongoose - Embedded Web Server / Embedded Networking Library Mongoose is a networking library for C/C++. It implements event-driven non-blocking APIs

Cesanta Software 8.6k Aug 8, 2022
MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).

MIRACL What is MIRACL? Multiprecision Integer and Rational Arithmetic Cryptographic Library – the MIRACL Crypto SDK – is a C software library that is

MIRACL 491 Aug 5, 2022
C Hypertext Library - A library for writing web applications in C

CHL C Hypertext Library - A library for writing web applications in C #include <chl/chl.h> int main() { chl_set_default_headers(); chl_print_header

null 272 Jun 20, 2022
This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.

?? C/C++ 技术面试基础知识总结,包括语言、程序库、数据结构、算法、系统、网络、链接装载库等知识及面试经验、招聘、内推等信息。This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.

huihut 25.2k Aug 7, 2022
C XML Minimalistic Library (CXML) - An XML library for C with a focus on simplicity and ease of use.

cxml (C XML Minimalistic Library) is a powerful and flexible XML library for C with a focus on simplicity and ease of use, coupled with features that enables quick processing of XML documents.

null 28 Feb 11, 2022
Edge ML Library - High-performance Compute Library for On-device Machine Learning Inference

Edge ML Library (EMLL) offers optimized basic routines like general matrix multiplications (GEMM) and quantizations, to speed up machine learning (ML) inference on ARM-based devices. EMLL supports fp32, fp16 and int8 data types. EMLL accelerates on-device NMT, ASR and OCR engines of Youdao, Inc.

NetEase Youdao 176 Jul 21, 2022
Edge ML Library - High-performance Compute Library for On-device Machine Learning Inference

Edge ML Library (EMLL) offers optimized basic routines like general matrix multiplications (GEMM) and quantizations, to speed up machine learning (ML) inference on ARM-based devices. EMLL supports fp32, fp16 and int8 data types. EMLL accelerates on-device NMT, ASR and OCR engines of Youdao, Inc.

NetEase Youdao 176 Jul 21, 2022
An easy-to-use and competitively fast JSON parsing library for C++17, forked from Bitcoin Cash Node's own UniValue library.

UniValue JSON Library for C++17 (and above) An easy-to-use and competitively fast JSON parsing library for C++17, forked from Bitcoin Cash Node's own

Calin Culianu 10 Aug 31, 2021
Isocline is a pure C library that can be used as an alternative to the GNU readline library

Isocline: a portable readline alternative. Isocline is a pure C library that can be used as an alternative to the GNU readline library (latest release

Daan 120 Jul 19, 2022
PillowResize library is a C++ porting of the resize method from the Pillow python library.

Pillow Resize Table of Contents Description Compilation Installation Usage Description PillowResize library is a C++ porting of the resize method from

Zuru Tech 30 Jul 29, 2022
A simple header-only C++ argument parser library. Supposed to be flexible and powerful, and attempts to be compatible with the functionality of the Python standard argparse library (though not necessarily the API).

args Note that this library is essentially in maintenance mode. I haven't had the time to work on it or give it the love that it deserves. I'm not add

Taylor C. Richberger 896 Aug 31, 2021
Libft is an individual project at 42 that requires us to re-create some standard C library functions including some additional ones that can be used later to build a library of useful functions for the rest of the program.

?? Index What is Libft? List of Functions Technologies ✨ What is Libft? Libft is an individual project at 42 that requires us to re-create some standa

Paulo Rafael Ramalho 7 Jan 17, 2022
Library that simplify to find header for class from STL library.

Library that simplify to find header for class from STL library. Instead of searching header for some class you can just include header with the class name.

null 6 Jun 7, 2022
Libft is an individual project at 42 that requires us to re-create some standard C library functions including some additional ones that can be used later to build a library of useful functions for the rest of the program.

Libft is an individual project at 42 that requires us to re-create some standard C library functions including some additional ones that can be used later to build a library of useful functions for the rest of the program.

Paulo Rafael Ramalho 0 Apr 5, 2022
The C Unit Testing Library on GitHub is a library designed for easy unit testing in C

The C Unit Testing Library on GitHub is a library designed for easy unit testing in C. It was written by Brennan Hurst for the purpose of providing a J-Unit-like testing framework within C for personal projects.

null 1 Oct 11, 2021
The C++ Network Library Project -- cross-platform, standards compliant networking library.

C++ Network Library Modern C++ network programming libraries. Join us on Slack: http://slack.cpp-netlib.org/ Subscribe to the mailing list: https://gr

C++ Network Library 1.9k Aug 9, 2022