Questions tagged [autobahn]

1

votes
0

answer
229

Views

how to set auto-reconnect=True when connecting with autobahn.twisted.component

When trying to connect a python app to a Crossbar router using the recommended component-decorator approach, how and where would i pass the auto_reconnect=True value to the transport. I can set the parameters in Component.transports, but that alone doesn't 'activate' auto-reconnect. When using the i...
stk
1

votes
1

answer
116

Views

run in twistd instead of python

I need to debug my twisted application. I am using pycharm and from what I understand I can start my application in twistd with the --no-daemon option in order to step through the code. I have the following code to start the server. def main(): log.startLogging(sys.stdout) contextFactory = ssl.De...
user1601716
1

votes
1

answer
51

Views

Combining 2 asyncio based code segments

I'm using the Autobahn asyncio system (to talk the Websocket WAMP protocol), which works fine and I can handle incoming RPC calls and pubsub. My problem is I now have to connect TCP sockets and send information over these sockets as soon as an RPC call comes in through the Autobahn part. The autobah...
wimg
1

votes
0

answer
218

Views

PHP Thruway + Authobahn.js = 426, how to use websockets with pub/sub?

I'm trying to use websockets mainly for pushing data from server to client on events. So, i configured locally Thruway and Autobahn.js twice: by myself and with help of this tutorial. Server starts correctly: ./bin/console thruway:router:start Making a go at starting the Thruway Router 2018-05-23T00...
trogwar
1

votes
1

answer
38

Views

Autobahn websocket client in Quart (async Flask) application

Good evening everyone. I'm not quite new to this place but finally decided to register and ask for a help. I develop a web application using Quart framework (asynchronous Flask). And now as application became bigger and more complex I decided to separate different procedures to different server inst...
Andrew K
0

votes
0

answer
5

Views

One single git repository for 2 different heroku apps with different PROCFILES, is it possible?

I want to create 2 different heroku apps.Both are using same github repository. Each app is having different processes to run i.e they need 2 different PROCFILES. Can we use same github code for runnning 2 different apps ? I created 2 different apps on Heroku. In Github code, created 2 different Pro...
Deepika Kasbale
1

votes
1

answer
263

Views

Python autobahn WAMP Messaging Protocol

I`m pipeing WAMP protocol through Pythons multiprocessing.pipe, and I nead to reimplement WampCraClientProtocol. Question A: In the ambiguous case of: exclude = ['ABCDEFGH001', 'ABCDEFGH002', 'ABCDEFGH003'] eligible = ['ABCDEFGH001', 'ABCDEFGH002', 'ABCDEFGH003'] [TYPE_ID_PUBLISH, topicURI, event,...
user2088594
1

votes
1

answer
1.1k

Views

How to add headers in websocket using autobahn library on android?

I am using Autobahn library for websocket on android, I just want to pass some headers while connecting ? How can I do this?
Bhaumik Shukla
1

votes
1

answer
133

Views

Is there a onSessionClose in WampServerProtocol?

I'm using Autobahn Python to make a WAMP server. I open up a database connection in onSessionOpen of my subclass of WampServerProtocol, and of course need to close it when the connection closed. However, I can't find a session close handler in either the tutorials or the docs.
Theron Luhn
1

votes
1

answer
242

Views

Can Autobahn use a custom json encoder?

When doing RPC with autobahn, autobahn supports procedures returning python objects as long as they are json serializable. Some objects I'd like to return are not by default json serializable. I can easily write a custom encoder, but how would autobahn know it needs to use it?
Arthur B.
1

votes
1

answer
208

Views

A callback for publish method in Autobahn?

I wonder why there is no callback defined on the publish method in AutobahnJS? I think it would be useful for the client who tries to publish something to know whether their publish call succeeded or not and react accordingly. I wonder if other frameworks that support pub/sub have such a callback fo...
elena
1

votes
1

answer
410

Views

Websocket Autobahn Testsuite Unhandled Error (Windows and Ubuntu)

I've just installed Autobahn Testsuite 0.5.5 on my Windows 7 and Ubuntu. Every time I want to run it I got the same error. My setup: Python 2.7.5 setuptools 1.1.6 Twisted 13.1.0 for Python 2.7 AutobahnPython 0.6.3 Any idea what might be a cause? Regards, Adam Ubuntu 12.04 Ok, will run 16 test cases...
Adam
1

votes
2

answer
3.1k

Views

How do I use Twisted (or Autobahn) to connect to a socket.io server?

I am trying to figure out a way to connect to a socket.io (node.js) server with a Python Twisted client. The server is a chat server which I didn't write, so I have no control over it. I tried a few things, mainly TCP connections, but I figured that I'll need to use the Websockets interface to commu...
d_dd
1

votes
1

answer
2.4k

Views

Autobahn Exception WebSockets protocol violation

in my android application I want to use the autobahn library to use websockets. I think the server is using draft-17. Can someone tell me, how to set up the Client to use this protocol? I have this code: mConnection.connect(url,new String[] {'protocolname?'}, new WebSocketHandler() { //some function...
1

votes
1

answer
1.3k

Views

How to stream WebRTC to WebSocket?

Hi I want to stream a WebRTC (MediaStream) video to a WebSocket (Twisted+Autobahn) and process the stream for OpenCV object detection and send it back to the client via FFServer (FFMPeg)? I have try using only WebRTC, WebSocket and OpenCV, but the streaming is not real-time.
1

votes
1

answer
186

Views

Android:Autobahn - Cancel requests/sendmessage on websocket

Scenario : 1. I have a list view, fetching data on the fly. Due to scrolling what data it might get could be stale. 2. When I implemented HTTP client using a thread , on scroll i would cancel all requests threadHandler.removeMessages(intwhat) so that no stale data was returned. 3. The autobahn Webs...
chaitanyad
1

votes
1

answer
828

Views

Background task for web socket server

I'd like to run a web socket server to provide an interface to a raspberry pi board. Specifically, I'd like to continuously poll a sensor, process input from a web socket with reference to a variable and then run a motor if required. I thought I would be able to have an __init__ method on a subclas...
bjw
1

votes
2

answer
677

Views

Installing Autobahn twisted onto python 3.4

I am running a simple server that connects to a https webpage through websockets. To keep the server running, I was going to use asyncio. To validate the SSL, I was going to use Twisted's rather simple functions. My problem is I am having the worst time getting Twisted to run on Python 3.4. Its sta...
wloggains
1

votes
1

answer
329

Views

Autobahn and Twisted, call wamp client method and get result via HTTP

I have done a client like this SomeClient, which talk with a WAMP v1 server. What I'm unable to do, as you can see on line 25, is to call the SomeClient.i_need_to_call_this method from the HTTPServer class. from twisted.internet import reactor from twisted.web import server, resource from autobahn....
Guido
1

votes
1

answer
952

Views

Ratchet WAMP onpublish always publish to all clients include the publish caller or not?

I have just made a chat hello world for the Ratchet WAMP + autobahn version 1. full source code here if you want to see The JavaScript client send chat message: function click_send_btn() { var json_data = { 'message': $.trim($('#input_message').val()) }; sess.publish('send_message', json_data,...
1

votes
1

answer
967

Views

Autobahn 0.9.5 (AMD) - Error during WebSocket handshake

I'm trying to implement autobahn 0.9.5 on my SPA project using DurandalJS. var ab = require('autobahn'); live = new ab.Connection( { url: 'ws://localhost:8080', realm: 'realm1' }); live.onopen = function(session, details) { console.log('Autobahn open successfully!', session); }; live.onclose = funct...
Fariz Azmi
1

votes
1

answer
430

Views

javascript errors do not show in the console when using autobahnjs

If I generate an error inside the connection.onopen function, it does not get reported in the console when running using node: connection.onopen = function (session) { console.log('Connection opened'); throw('wobble'); console.log('Bye now..'); }; Console shows: node autobahn_test.js Connection open...
Mike Raistrick
1

votes
1

answer
542

Views

Autobahn pubsub, queues and topics?

The Autobahn documentation is a bit unclear on which/how clients receive messages once they are published. Out of the box it seems that a message is broadcast to all subscribers of a topic - they all get it. But is there any way to distribute a message to a single client? Something in the lines of a...
c0dem4gnetic
1

votes
1

answer
422

Views

Dynamically change crossbar.io authorization

I am using crossbar.io and would like to modify realm-role authorization permissions on the fly via the Management API. The excerpt below is from http://crossbar.io/docs/Authorization. Crossbar.io can be dynamically reconfigured via the Management API. This includes the ability to reconfigure the au...
binary_luigi
1

votes
1

answer
479

Views

How to remove this error from autobahn python script?

I am following the tutorial on Autobahn python from the link below; https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/app/calculator/calculator.py The code that caused the error is below; runner = ApplicationRunner(router, u'realm1', standalone = not args.router, debug = Fa...
user781486
1

votes
2

answer
504

Views

Cherrypy + Autobahn websockets on same port

Is it possible to run (mount in cherrypy tree) autobahnn's websocket class to run on same port but different URL? For example: http://localhost:8080/web to server static content (html + javascript) ws://localhost:8080/websocketA to server some WS communication through class WSA ws://localhost:8080...
Baboon
1

votes
1

answer
238

Views

Caller identification in Autobahn | Python

I am trying to find out how to disclose the caller in Autobahn|Python as described here: http://crossbar.io/docs/Caller-Identification/ I found the following in the docs: class autobahn.wamp.message.Call(request, procedure, args=None, kwargs=None, timeout=None, receive_progress=None, disclose_me=Non...
Casper Alant
1

votes
1

answer
356

Views

How do I know who sent a WAMP message?

Is there any way to get metadata about who (authid) published a given message or called an RPC? After I have users authenticate and authorize them for a given role (e.g. allowing them to publish to mychat) how can I prevent clients from spoofing each other's names? Subscribers/callees are just passe...
Nick T
1

votes
1

answer
90

Views

AutobahnJS: Remote call to asyncronous function

I'm trying to make a call over WAMP to a remote function. But I don't know how to write the called function if it has asynchronous behavior. In every example I've seen the remote function returns the result. How can this be done in an asynchronous manner where I would normally use a callback? Exampl...
Sean Lynch
1

votes
1

answer
1.8k

Views

d3js chart update triggered on websocket message

Running an autobahn websocket server in Python and picking up json updates in the html frontend. The value (in this case 'temp') is being displayed as a number with innerHTML when message arrive and that part works fine. We also got a dial chart (d3js) but the update is initiated by the setInterval...
TomSjogren
1

votes
1

answer
414

Views

“Connection refused” Autobahn Android to Java EE Endpoint

I have a Java EE Endpoint set up on a Payara server to which I attempt to connect an Android client using Autobahn WebSockets. I have the following setup: My WebSocket Endpoint on the server: public class CommunicationSocket extends Endpoint { @Override public void onOpen(Session aSession, EndpointC...
Christian Eriksson
1

votes
1

answer
372

Views

Autobahn JS Subscription management

I am setting up a blog between our clients and us so they can have a space to talk about the different commercial transactions (each commercial transaction has a reference number and has it's own information). Right now I was able to setup Ratchet with ZeroMQ and Autobahn to achieve this. Whenever...
Lalo Santos
1

votes
1

answer
52

Views

Memory consumption of Crossbar retained events

self.publish('foo.%s' % id, 'bar', options=PublishOptions(retain=True)) When using retained events, what's the memory consumption behaviour on the Crossbar router? Is the event stored forever, or is it purged after some time and the memory reclaimed? I'm using wildcard topics, so there will be an ev...
deceze
1

votes
1

answer
30

Views

Import error when importing MsgPackSerializer

I am trying to import the MsgPackSerializer from autobahn library. But I am getting the following error: ImportError: cannot import name MsgPackSerializer I have tried this solution but did not work - https://github.com/Crypto-Expert/stratum-mining/issues/211#issuecomment-33867305 Using Miniconda 3.
Avijit Dasgupta
1

votes
1

answer
1.9k

Views

how to use AutobahnJs to send a message to a specified client?

I need a scheme of push message server. By now I choose AutobahnJs + AutobahnPython scheme. use websocket of html5 by AutobahnJs Library connect to server which use by AutobahnPython now, clientA ,clientB,clientC connect to server. APPS want to send a message to clientA. How to do it? this is my fl...
user1514160
1

votes
2

answer
797

Views

Getting dependencies to load correctly in requirejs (autobahn and whenjs)

I have been stuck on this problem for the past few hours. I'm trying to get autobahnjs and whenjs to be loaded correctly by requirejs. require.config({ paths: { angular: '../bower_components/angular/angular', angularBootstrap: '../bower_components/angular-bootstrap/ui-bootstrap', bootst...
Flukey
1

votes
1

answer
143

Views

How to notify client of successful/failed subscription?

I'm subscribing to 'queue:1.2.3'. How does the client know if they have successfully subscribed? Is there a mechanism for the server to respond to the client? Below is a simple program that I'm using to test the subscriptions. I'm not sure what to show on the server side. var sess; var wsuri = 'ws:/...
Travis Rotz
1

votes
1

answer
1.2k

Views

Streaming Video via Autobahn WebSocket

I capture video frame from OpenCV VideoCapture.read() and send the frame to a WebSocket server (Twisted with Autobahn WebSocket API), I also use the Twisted IPushProducer interface to stream data to the WebSocket and eventually it cleans up the camera when sending back to client. Here is my code. se...
1

votes
1

answer
1.6k

Views

Websocket connection with autobahn and twisted in python

I'm trying to use twiested with autobahn to connect to a websocket server from autobahn.twisted.websocket import WebSocketClientProtocol class OkcClient(WebSocketClientProtocol): def onOpen(self): #self.sendMessage(u'Hello, world!'.encode('utf8')) self.sendMessage(u'{'event':'addChannel','channel':'...
jbssm
1

votes
2

answer
409

Views

Autobahn: Subscribing to channels with regex or wildcard pattern

My question is very simple and straight-forward. In RabbitMQ, we can subscribe to channels using regex or wildcard pattern('Topic' type subscription). So is there any possibility to achieve this in Autobahn ?
Kamalakannan J

View additional questions