[Gossip-dev] File transfers
Dimitur Kirov
dkirov at gmail.com
Thu Apr 5 14:39:07 CEST 2007
@Martyn Russell <martyn at imendio.com> wrote:
> > LmBsSession is the public class. It is designed to keep track of all
> > transfers among all accounts. Currently libgossip creates one
> > instance of this class per account. I suggest to change this and
> > put LmBsSession instance in gossip-session, so that we have one
> > LmBsSession per program.
>
> That makes sense to me too yes.
I couldn't figure out how to change it. gossip-session is part of the ui
and doesn't deal with lm-* api. At the same time all protocol related
classes are per account. Generally, we needed:
bs_session = lm_bs_session_get_default (NULL);
lm_bs_session_set_failure_function (bs_session, faiure_function, ...)
lm_bs_session_set_complete_function (bs_session, complete_function, ...)
lm_bs_session_set_progress_function (bs_session, progress_function, ...)
These three functions must be called once per program, not once per
account, or transfer. Can you point me to where should I put these
callbacks and their registration ?
>
> > LmBsClient class is used for all socket io actions. In the future it
> > will be replaced by lm-socket.c , because they overlap in
> > functionality. This will require extending the lm-socket class with
> > some functionality for synchronous communication:
> > - callback for data_written event
> > - ability to add and remove socket watches for reading
>
> Hmm, are you just extending the synchronous functionality here and
> also have asynchronous functionality available?
Just extending the synchronous functionality, by adding one more callback in
LmSocketFuncs and ability to set io watches by condition (read/write).
> > xep 0096 requires that clients with FT support should advertise
> > their FT profile as a result of disco info request. I added the
> > following features and I'm not sure if they cover everything that
> > gossip has: <feature
> > var="http://jabber.org/protocol/disco#info"></feature> <feature
> > var="http://jabber.org/protocol/si"></feature> <feature
> > var="http://jabber.org/protocol/si/profile/file-transfer"></feature>
> > <feature var="http://jabber.org/protocol/bytestreams"></feature>
> > <feature var="http://jabber.org/protocol/muc"></feature>
>
> Yes, we should be able to do that with little trouble. We have
> protocols/jabber/gossip-disco.[ch] to handle that sort of thing, I am
> not sure of the state I left it in :) it might need some work.
It is part of the patch already. Apparently the message handler needs to
stay alive all the time.
@Mikael Hallendal <micke at imendio.com>:
> >> Currently file transfer session ids are generated with a simple
> >> incremental rule GOSSIPSID1,GOSSIPSID2 .. etc. This is not good from
> >> security point of view, because every internet user will be able to
> >> steal a file if he knows that certain user runs gossip.
> >
> > OK. Actually Micke, isn't this something you changed in Loudmouth? So
> > the message IDs are now a generated number?
>
> Loudmouth currently generates entirely random numbers, too random in
> fact as it makes tracking the numbers hard :)
So it is fine then.
Regards,
D.Kirov
More information about the Gossip-dev
mailing list