Open o-jasper opened 9 years ago
The communications over tox i speak of https://github.com/o-jasper/tox_comms
@o-jasper what if core provided a method JUST to unique and identify messages? That wouldn't be core doing anything expecting enforcing a way for clients to reference messages. @irungentoo has said that tox will ALWAYS be a communication backbone, so why not add in a feature that allows for clearer communication; the ability to reference a unique message without ambiguity.
@GrayHatter you mean that what i say goes a bit far? I.e. that it should basically just be send_lossless_packet
and send_lossy_packet
?(plus the bootstrapping, friend handling stuff of course)
I think that goes too far imo it should at least help standardize identifying which stream is what. I.e. send_lossless_packet
and send_lossy_packet
plus an identifier of which stream. You dont want people creating two adresses so their program knows which stream is which. I'd prefer doing the "call function on other side" idea aswel, i think that'll take the discussion how to use it out of "and then you use this bit too..." or "then later you respond", because the idea of the function call on the other side encapsulates it. (at least that is the idea)
I see this, but dont see a statement where it is going?
I think perhaps a separation between the messaging-application stuff and communication-between-pubkeys might be good.
For transferring data; what of the idea of "exposing a function"? I am trying to implement this with lua.(Lua is more suitable than C for passing functions, of course.. Also: using messages.. some luajit ffi trouble with 3rd arg
tox_friend_sendfile
)tox_fun(tox, name, uint8_t* (*callback)(uint8_t* in, int insize, int* size)
returnNULL
to not respond at all.tox_call(tox, name, uint8_t* data, int datasize, callback)
Call the function if defined on the other end. If callback, it is used if the function returns and sends data back. (Callbacks can themselves send more calls as needed. We know the peril of infinite recursion.)Then i.e.
"ask_name"
,"update_name"
could ask/update own name.(larger chunks synchronized, i suppose you might ask is this your hash? and if-not, then actually send it.)"msg"
could send the message, etcetera. 3rd parties will have to stay out of simple names. Like"myproject.something"
. Would be easy to add something like"keep_message_for"
with an argument indicating a recipient that should get the rest of the data when he is online.Of course this does not worry about stuff that work nicer as streams or are lossy. Perhaps some standard way to respond to a function by saying "look at this stream" would be nice. That said, i dont currently see how
send_lossless_packet
andsend_lossy_packet
are supposed to identify themselves. I.e. what if you have two things using that? Are people supposed to agree to using the first four bytes to identify which manually? Why noid
argument in them?What i want to make with my lua thingy was a "decentralized reddit"(i need a name for it..) btw, and using Tox as (perhaps one of) the channels of communication for it. (thinking of using bloom tables so you can ask questions like "all comments on this link", so you can look at more than at what nearby nodes know) ^(Note: post was edited a bit)