by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 14:01
    enricoschroeder opened #1247
  • 13:56

    gdamore on bug1241

    (compare)

  • 13:56
    gdamore closed #1241
  • 13:56

    gdamore on master

    fixes #1241 SIGSEGV in RepReq's… (compare)

  • 13:56

    gdamore on bug1241

    fixes #1241 SIGSEGV in RepReq's… (compare)

  • 05:38

    gdamore on master

    Clean up section descriptions (compare)

  • 04:57

    gdamore on master

    Section 3TCP is defunct. Note commercial TLS and FIPS su… (compare)

  • May 24 23:21

    gdamore on bug1241

    fixes #1241 SIGSEGV in RepReq's… (compare)

  • May 24 23:20
    gdamore edited #1241
  • May 24 18:58

    gdamore on bug1230

    (compare)

  • May 24 18:58
    gdamore closed #1230
  • May 24 18:58

    gdamore on master

    fixes #1230 NNG_OPT_RECONNMAXT … (compare)

  • May 24 18:02

    gdamore on bug1230

    fixes #1230 NNG_OPT_RECONNMAXT … (compare)

  • May 24 18:00

    gdamore on bug1230

    fixes #1230 NNG_OPT_RECONNMAXT … (compare)

  • May 24 17:08
    gdamore closed #478
  • May 24 05:57
    gdamore labeled #1230
  • May 24 05:56

    gdamore on bug1230

    fixes #1230 NNG_OPT_RECONNMAXT … (compare)

  • May 24 05:55
    gdamore edited #1230
  • May 24 05:46
    gdamore assigned #1230
  • May 24 05:46
    gdamore assigned #1224
Garrett D'Amore
@gdamore
Please provide sample code to reproduce.
Pierre Yager
@zedalaye_gitlab
@gdamore thank you
Pierre Yager
@zedalaye_gitlab
Hi, again, I have another networking architecture question : I have to rewrite a piece of IPC between my main application and some of its satellites. For now this is done using NamedPipes from Win32 API : When the main app is started it registers itself as a server. Satellites apps (clients) can post asynchronous commands (kind of RPC) to the main app (and they don't care wheter they are processed or not). On the other side the main app dispatch its state changes (like busy / idle) to the satellites so they can adjust their UI to reflect the main app state. What is the simplest way to do that using nng ? Thanks.
Garrett D'Amore
@gdamore
How does the main app signal back to the satellites when that state changes ?
Assuming this is just done using messages you can use bus to get what you want.
Davester47
@Davester47
Is there a way to use libnng to send ping requests?
Atif
@atif1996
Not really. That’s a ICMP request, and nanomsg does these higher level communication protocols on top of TCP.
I think your best bet is to go to bsd sockets api and look up an example for ping
Davester47
@Davester47
@atif1996 thank you. I will go check out the BSD sockets api.
Garrett D'Amore
@gdamore
Make sure you really want an ICMP echo request. Usually they mean less than people to assume.
D0tNet4Fun
@D0tNet4Fun
hey guys, i am trying to write c# bindings for NNG. noob question: am i correct to assume that nng_msgrecv always allocates memory for the message? there is no way for me to pass a pre-allocated message, is it?..
Garrett D'Amore
@gdamore
I believe you may be repeating work others have done.
D0tNet4Fun
@D0tNet4Fun
yes, but i do this for fun and to learn how the library works on my own
D0tNet4Fun
@D0tNet4Fun
the way i understand it from the documentation is that i get a new message after calling nng_msgrecv, meaning new memory is allocated by nng. this memory can be reused only if ipass it to nng_msgsend. otherwise i have to free it. is this correct? sorry, i have a c# background and less knowledge of c.
Garrett D'Amore
@gdamore
So yes, nng_recvmsg allocates the entire message (memory and all) -- you cannot give it a preallocated message because we have no idea how big the message is until you receive it.
Your understanding is correct.
I believe that is also reasonably documented in the API reference.
Charlie Jiang
@cqjjjzr
Hi there, I'm wonder if there is any alternative to Polyamorous PAIR. I'm trying to implement a relatively "traditional" server-client pattern, and the poly-pair sockets seem to be perfectly fit into my demand. Also I wonder the reason for deprecating it.
Garrett D'Amore
@gdamore
The reason for deprecation relates to deficiencies in the protocol that preclude using it with devices. So no scale out for example.
A true mesh protocol is needed.
D0tNet4Fun
@D0tNet4Fun
hi there, i need some help understanding contexts. i've been reading the documentation, i've seen the examples on github and i'd like to validate my understanding. here's what i gathered so far: a context is bound to a protocol, but not all protocols "have" contexts. those with contexts are the ones whose documentation mentions "Context Operations". these are: request-reply and survey-respondent. this means that for the rest of the protocols it makes no sense to use contexts. is this correct?
Nate Kent
@neachdainn
I believe subscribers also have contexts, which can subscribe to different things.
Garrett D'Amore
@gdamore
Correct, sub supports contexts.
It's possible I forgot to update the docs for that.
The ones that don't have contexts are basically completely stateless so there is nothing to keep track of.
D0tNet4Fun
@D0tNet4Fun
i see. is there a way to tell that a protocol is stateless?
Garrett D'Amore
@gdamore
I'm sorry, was on a call.
Basically req/rep, surveyor/respondent are stateful.
sub is "sort of stateful". (It will become more so if we have publisher side filtering)
Everything else is stateless at present.
The docs are supposed to give you the information about contexts. That's meant to be your clue.
D0tNet4Fun
@D0tNet4Fun
nice. thank you!
Paramita
@namo-ratna-trayaya
Execuse me. If zero-copy method is used for nanomsg, does it decrease the push/pull performance if low level zero-copy buffer is not freed immediately?@gdamore
Garrett D'Amore
@gdamore
@namo-ratna-trayaya you should not need to worry about that.
Paramita
@namo-ratna-trayaya
Excuse me. Does nanomsg TCP communication support kerberos? @gdamore
And how to support this feature? Thank you.
Garrett D'Amore
@gdamore
There is no support for kerberos in nanomsg.
And it kind of makes no sense. Kerberos is about authentication.
Not encryption.
bsdis
@bsdis

Hello. I am trying to build this example using master branch of nng: https://nanomsg.org/gettingstarted/nng/pubsub.html (It says on that docs: "This document is derived from an original post by Tim Dysinger. However, the examples here are for nng instead of nanomsg."). When i compile i get these errors:

$ gcc nngpub.c -lnng -o pubsub
//usr/local/lib/libnng.a(posix_thread.c.o): In function `nni_plat_thr_main':
posix_thread.c:(.text+0x45f): undefined reference to `pthread_sigmask'
//usr/local/lib/libnng.a(posix_thread.c.o): In function `nni_plat_thr_init':
posix_thread.c:(.text+0x4e2): undefined reference to `pthread_create'
//usr/local/lib/libnng.a(posix_thread.c.o): In function `nni_plat_thr_fini':
posix_thread.c:(.text+0x519): undefined reference to `pthread_join'
//usr/local/lib/libnng.a(posix_thread.c.o): In function `nni_plat_init':
posix_thread.c:(.text+0x5ea): undefined reference to `pthread_mutexattr_init'
posix_thread.c:(.text+0x635): undefined reference to `pthread_mutexattr_settype'
posix_thread.c:(.text+0x65b): undefined reference to `pthread_mutexattr_destroy'
posix_thread.c:(.text+0x6a6): undefined reference to `pthread_mutexattr_destroy'
posix_thread.c:(.text+0x6dc): undefined reference to `pthread_atfork'
posix_thread.c:(.text+0x702): undefined reference to `pthread_mutexattr_destroy'
//usr/local/lib/libnng.a(posix_thread.c.o): In function `nni_plat_fini':
posix_thread.c:(.text+0x77b): undefined reference to `pthread_mutexattr_destroy'
collect2: error: ld returned 1 exit status

What am I missing here?
I am compiling like this: gcc nngpub.c -lnng -o pubsub

bsdis
@bsdis
i found the issue. needed -lpthread also
manual did not mention that
bsdis
@bsdis
Cody Piersall
@codypiersall
Just posted an answer on the SO question... hopefully this helps!
Garrett D'Amore
@gdamore
The docs do need to be clearer about SUB.
bsdis
@bsdis
@codypiersall aha thanks....it helps partly...but i am still having issues when trying to send a full camera frame. Thats a char* of size 5044624 bytes
it does work for a small message like char* = "msg"; though
bsdis
@bsdis
@codypiersall Hmm is there some limit as to how many bytes i can send per message or something?
Cody Piersall
@codypiersall
Just opened this chat window back up, little late! For posterity's sake, nng used to drop messages larger than 1MB by default, and pynng hasn't been updated yet (it still uses an older version of nng).
bsdis
@bsdis
arrrg...nng/pynng was working fine for a while and now after machine restart it just stopped sending messages totally. Any idea what could be the reason?