On 05/11/2018 18:32, meejah wrote:
Chris Withers <ch...@simplistix.co.uk> writes:

So, separate question: I have a client that's making a connection to a
websocket from a server. The client needs to send an "auth" message
once the websocket is up, and the client code shouldn't progress until
it receives an affirmative response. How do I do this in a
non-blocking way when using twisted? (inside an inlineDeferred method
in this case!)

There's nothing really special about an @inlineCallbacks method -- it
just returns a Deferred so you can handle it like any other
Deferred-returning method.

Thanks, but the special bit I was asking about is having my application's logical flow pause until the websocket is successfully up and a successful response has been received, all without blocking the reactor.

How do I do that?

Chris

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to