[Twisted-Python] How work ldaptor and twisted
Julien Peeters
jj.peeters at gmail.com
Wed Jun 27 14:37:22 EDT 2007
I read all these but I don't understand how do I have to use the
deferred return by the connect method from the LDAPClient
c = ldapconnector.LDAPClientCreator(reactor, pureldap.LDAPClient)
d = c.connect('...')
I don't understand why I have to add all my callback's to this deferred.
If I understand the meaning of a deferred, it represent a result that
will be return. And then, once connected, the deferred have no sense
anymore for me...
For example this code:
def fun(proto):
d = proto.send(request)
d.addCallback(responseHandler)
return d
I don't understand why I have to return the deferred and how it interact
with something else.
Globally, I understand what is the reactor, what is a deferred, how can
I make a client, a server. My problem state in the interaction of these
concepts. The link between them from a technical and implementational
point of view.
There is some detailed sequence diagrams some where I can found?
I suppose I miss an important part of the concepts, but I don't know
what.
Julien.
On Wed, 2007-06-27 at 16:40 +0100, Matthew Glubb wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Julien,
>
> Have a look at the documentation on the twisted website:
>
> <http://twistedmatrix.com/projects/core/documentation/howto/index.html>
>
> Its pretty good at giving you an overview of how twisted works. You
> might want to have a general read about the difference between
> asynchronous event programming and programming with threads.
>
> Hope that helps,
>
>
> Matt
>
> On 27 Jun 2007, at 16:19, Julien Peeters wrote:
>
> > Hi everybody,
> >
> > I'm new to ldaptor and twisted. I don't really understand how twisted
> > work and how can I build a little application with them.
> >
> > I would like to make a mini app which offers me the possibility to
> > administrate very simply my ldap server.
> > Then, the app have to wait for orders, and when it receive one,
> > treat it
> > by sending the appropriate request via ldaptor.
> >
> > My problem is with twisted, and more precisely with the "reactor". I
> > don't really understand how I can manipulate it and what is the
> > place of
> > defered's in all that?
> >
> > Thanks,
> > Julien.
> > _______________________________________________
> > Twisted-Python mailing list
> > Twisted-Python at twistedmatrix.com
> > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>
>
> m a t t h e w g l u b b
>
> ________________________________________________________________________
> Z Group PLC
>
> Tel: +44 (0) 8700 111 173
> Fax: +44 (0) 8707 051 393
> Txt: +44 (0) 7800 140 877
> Web: <http://www.zgroupplc.com/>
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they are
> addressed. The opinions expressed in this mail are those of the author
> and do not necessarily represent the views of the company. If you have
> received this email in error please notify <service at zgroupplc.com>
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (Darwin)
>
> iD8DBQFGgoTVyI6MkdKPngkRAnGkAJwJJEdvR0pIrxWdfBWdCRWaBfR7TwCfRzsz
> LZb2FVJ5+LuAttTd5cMldqY=
> =Sj7a
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20070627/9a804af7/attachment.pgp
More information about the Twisted-Python
mailing list