send message "onOpen" outside of the loop

#1

Hi Guys,

I’m kind of new guy in the twisted world basically i have a SIP client application based on twisted too , in this application i have varios accounts and i need to open a WS socket connection for each one.

so my questions are the following

  1. how can i send a message from my SIP app ? each autobahn / sip app run in their own loop / is there a way to attach it?

  2. how can i create/attach an Autobahn connection per account.

thanks in advance hope you could help me to move this rock.

-Javier

0 Likes

#2

Hi,

You can run any twisted lib with an autobahn client, you just need to make sure not to start the reactor before you setup both. You can ensure autobahn doesn’t try to start the reactor automatically with start_reactor=False : http://autobahn.ws/python/reference/autobahn.twisted.html#autobahn.twisted.wamp.ApplicationRunner.run

I don’t understand the second question. You’ll get one connection per connected client, whatever you do.

···

On Monday, June 1, 2015 at 10:10:13 PM UTC+2, Javier Riveros wrote:

Hi Guys,

I’m kind of new guy in the twisted world basically i have a SIP client application based on twisted too , in this application i have varios accounts and i need to open a WS socket connection for each one.

so my questions are the following

  1. how can i send a message from my SIP app ? each autobahn / sip app run in their own loop / is there a way to attach it?
  1. how can i create/attach an Autobahn connection per account.

thanks in advance hope you could help me to move this rock.

-Javier

0 Likes