[Twisted-Python] SSL and Perspective Broker

Edmund Dengler edmundd at eSentire.com
Tue Aug 5 09:32:51 MDT 2003


Never mind! Got it to work. I had a mistyping in the server side when
doing a bit of mucking about.

Connection established and transfer working at the moment.

Regards!
Ed

On Tue, 5 Aug 2003, Edmund Dengler wrote:

> Trying it out. Is there any documentation (ala the How To's) to show how
> to use the new API.
>
> Tried it out, had to change the contextFactory and context orders, and
> used serviceName and perspectiveName.
>
> Here is the new go() method in the client side:
>
> ----------
>
>     def go(self):
>         factory = pb.PBClientFactory()
>         reactor.connectSSL("localhost", 8800, factory, ssl.ClientContextFactory())
>         def1 = factory.getPerspective("user1", "pass1", serviceName="TransferService", perspectiveName="perspective1")
>         def1.addCallbacks(self.startTransfer, self.unable)
>         print "finishing go()"
>         reactor.run()
>
> ----------
>
> And here is what I get when I run it:
>
> > python pb7client.py
> pb7client.py:16: DeprecationWarning: Please update your backend to use updated APIs.
>   def1 = factory.getPerspective("user1", "pass1", serviceName="TransferService", perspectiveName="perspective1")
> finishing go()
> TransferClient.unable() called
> Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 61: Connection refused.
>
> I can telnet to the port, so it is not a networking issue.
>
> Regards,
> Ed
>
> On Mon, 4 Aug 2003, Itamar Shtull-Trauring wrote:
>
> > On Mon, 4 Aug 2003 18:52:33 -0400 (EDT)
> > Edmund Dengler <edmundd at eSentire.com> wrote:
> >
> > > I'm locking up again. It looks like it gets further than when I had my
> > > problems with 1.0.5. The client claims to have gotten a root reference
> > > (good, this is further), but the server does not show the attaching
> > > client. It looks like the client is blocking in the pb.logIn method.
> > >
> > > Twisted Version: 1.0.7alpha2
> >
> > getObjectAtSSL is deprecated in CVS. If you can reproduce this with CVS
> > I'll be glad to take a look.
> >
> >   # this is how it'd look:
> >   factory = pb.PBClientFactory()
> >   reactor.connectSSL("localhost", 8787, contextFactory, factory)
> >   deferredOfPerspective = factory.getPerspective("identity", "password",
> > perspective="joe")
> >
> > --
> > Itamar Shtull-Trauring    http://itamarst.org/
> > Available for Python & Twisted consulting
> >
> > _______________________________________________
> > Twisted-Python mailing list
> > Twisted-Python at twistedmatrix.com
> > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
> >
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>





More information about the Twisted-Python mailing list