How to pass back info from peer

41 views
Skip to first unread message

jenre...@gmail.com

unread,
Apr 16, 2018, 11:32:21 AM4/16/18
to zetta-discuss
Hi!

I've been using and learning about zetta, reading a lot of the posts here.  This is my first post, 'cause I'm really stuck now.

I'm trying to pass back some info from a peer, once it's connected.  Thought I could add an onPeerConnect handler, but there doesn't seem to be a way to load new info there.  All I see is incoming message, socket, head, and then the next callback.  Has anyone used this or some other method to get info from a peer back to the main server that initiated the link?

Thanks!

Adam Magaluk

unread,
Apr 17, 2018, 10:02:45 PM4/17/18
to jenre...@gmail.com, zetta-discuss
Could you explain your usecase a bit more so maybe there's something I can suggest?

As far passing info back there isn't a mechanism besides traditional zetta devices, you could create one that has actions with inputs. 

--
You received this message because you are subscribed to the Google Groups "zetta-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zetta-discus...@googlegroups.com.
To post to this group, send email to zetta-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zetta-discuss/4e90d225-4609-4392-b3d8-a430d78a4123%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jenre...@gmail.com

unread,
Apr 19, 2018, 10:29:14 AM4/19/18
to zetta-discuss
Well, I realize what I want to do is kinda backwards...  the idea I think is that the peer initiating the link is sharing its information with the receiving peer (in some ways these are not really "peers", so that confuses the terminology)

Anyways, I wanted the receiving peer to share meta information about itself back to the peer which initiated the link.  I was looking into using zetta with a security model we already have in place for other software. Every server has a unique id, and I want the peers to share that id.  It is easy for the initiating peer to put it in the request, but I can't figure out a way to put it in the response.  socket.write doesn't work, and I couldn't figure out how to insert something into the headers.

I don't want to add the info to the peer's properties.  I don't want the info to be available in any way to an API request.  I just wanted to share the info once, at the time of peer connection.  I've looked into the zetta code a little, but I'd really rather not modify any of that, but instead use extensions.  I'm not sure if what I want to do is really possible, so I'm stuck. Still.

jenre...@gmail.com

unread,
May 2, 2018, 1:44:42 PM5/2/18
to zetta-discuss
Okay, I never did figure out a way to do this.  What I did instead was pass the info from the initiating peer to the receiving peer (in the request header).  We then have to process the info on the receiver instead of the initiator as originally wanted, but it worked out.
Reply all
Reply to author
Forward
0 new messages