Questions tagged [ws4py]

`ws4py` is a `python` package implementing the `WebSocket` protocol as defined in RFC 6455. It provides client and server implementations alike that using different techniques like threads, micro-threads or event loops.

ws4py is a python package implementing the WebSocket protocol as defined in RFC 6455. It provides client and server implementations alike that using different techniques like threads, micro-threads or event loops.

23 questions
7
votes
1 answer

WebSockets Proxy for IPython Notebook using Flask and WebSocket-for-Python (ws4py)

Inspired by ipython-notebook-proxy, and based on ipydra, and extending the latter to support more complex user authentication as well as a proxy, because in my use case, only port 80 can be exposed. I am using flask-sockets for the gunicorn worker,…
4
votes
1 answer

maximum score in WordNet based similarity

some of simlarity score are ranged between 0 and 1 such as shortest path and WuP. therefore the similarity between car and automobile will be 1 but other measures such as LCh will be lch( car, automobile ) = 3.6889 I want to know the maximum score…
Jan Mohd
  • 83
  • 7
4
votes
1 answer

creating own application using ws4py

I have created a web server socket using ws4py and which uses cherrypy. When I connect to the server using ip:port it connects perfectly and am able to chat through multiple browsers. However when I try to connect ip:port/ws it also works. …
madan
  • 773
  • 13
  • 38
3
votes
1 answer

ws4py.websocket: Closing connection from client long delay

I created a secure WebSocket server using the ws4py.websocket package. A javascript client connects to this Websocket and sends some JSON messages to it. Now when my JS client closes the connection (function disconnect), it takes about 30 secondes…
alpadev
  • 470
  • 9
  • 23
3
votes
0 answers

Why does this ws4py/CherryPy example block messages after a certain time?

I have the following setup: Running under Linux x64 using Python 3.4 is a CherryPy-10.2.1 webserver with a ws4py-0.4.2 broadcast handler that will print the received message (containing a timestamp) and the runtime of this message. Then there are 60…
3
votes
2 answers

WAMP support for ws4py / CherryPy

I am using ws4py / CherryPy for websockets support, and would like to implement WAMP on top of it. I thought of using autobahn but it only seems to support Twisted and asyncio out of the box. Is possible to use autobahn functionality to extend…
mar10
  • 14,320
  • 5
  • 39
  • 64
2
votes
0 answers

In ws4py package for websockets (python) close() api is not shutting down connection

I am trying to write a websocket client that listens from a websocket server for some events and dumps them on screen. If the length of message exceeds 250 chars, I wan the connection to close. I have written the following code for it: import…
Akshya11235
  • 959
  • 4
  • 11
  • 25
2
votes
1 answer

Python - Send file through JSON

I'm trying to create a live chat application using ws4py (if there are better socket libraries I would love recommendations) and I want to implement file transfer (specifically .wav files) in my application. For text chat messages I'm currently…
Faizan Virani
  • 134
  • 1
  • 11
2
votes
0 answers

How to return from a Rails rack call?

I am using Faye websocket implementation. When a websocket is detected I want to make sure the user sent a given header before I open the connection, or else I want to return an error. I tried returning error 401 using [] but I keep oberving that…
XAnguera
  • 1,157
  • 1
  • 11
  • 25
2
votes
1 answer

Websocket (ws4py in Python 3.5) not working in Docker container

I have a simple web application that uses CherryPy for a RESTful backend and ws4py for websockets. 1) Javascript client sends a POST to Python backend 2) Python replies with a unique id 3) Javascript connects to the websocket and sends the unique…
Sevag
  • 191
  • 2
  • 15
2
votes
0 answers

Bridging websocket requests to ZMQ and back

I created a web socket server with ws4py that dispatches messages to a ZMQ message bus and returns responses to the web socket. The stripped down code looks like this: from multiprocessing import Process from gevent import monkey;…
orange
  • 7,755
  • 14
  • 75
  • 139
2
votes
1 answer

read TextMessage ws4py on python 3

I have created a web server socket using ws4py 0.3.2 and which uses cherrypy 3.2.4 on python 3.3.2 .When I try to print Message of client send to server like this class ChatWebSocketHandler(WebSocket): def received_message(self, m): …
Hiếp me
  • 125
  • 10
2
votes
2 answers

How do I add websocket-capable paths to a running CherryPy application?

I am trying to dynamically create/destroy "websocket-capable" paths in CherryPy, using ws4py. Here is a full program that demonstrates the problem: import cherrypy from ws4py.server.cherrypyserver import WebSocketPlugin, WebSocketTool from…
Roni Choudhury
  • 486
  • 4
  • 15
1
vote
0 answers

What does Going away 1006 error mean in Python Websocket?

I have established connection with the server and everything worked fine. After couple of days I noticed data is not being updated, checked the logs and saw this: Message: 'Closed down' Arguments: (1006, 'Going away') From the documentation: …
giliev
  • 2,938
  • 4
  • 27
  • 47
1
vote
1 answer

ws4py appears a error in Linux system

I use ws4py as a websocket server. it can run normally in Windows and Mac, but it runs in linux system raising a TB when websocket clients connect to server. Anybody can tell me how to fix this bug? [2016-01-06 20:51:43,094] ERROR Failed to receive…
huiji_Leung
  • 41
  • 1
  • 2
1
2