- Php Websocket Client
- Websocket Client For Macos X
- Websocket Client For Macos 7
- Websocket Client For Macos Windows 7
- Websocket Client For Macos Mac
- Civetweb is a small footprint HTTP Server with optional Lua and SQLite support written in C. It can be embedded into C/C applications or used as stand alone web server for Windows, Linux, BSD or Mac-OS. This project is based on the Mongoose web server, but maintains the MIT license and is free from GPL licenses.
- Running testing WebSocket server on macOS. Note: If you want httpuv to build faster, you can create a file at /.Renviron with the following content: MAKEFLAGS=-j4 To install the development version of httpuv, run.
Released:
Smart default settings for Django websites
Project description
Based on django-channels and celery, df_websockets simplifies communication betweenclients and servers and processing tasks in background processes.
df_websockets is based on two main ideas:
- signals, that are functions triggered both on the server or the browser window by either the server or the client,
- topics to allow the server to send signals to any group of browser windows.
Signals are exchanged between the browser window and the server using a single websockets. Signals triggered by the browser on the server are processed as Celery tasks (so the websocket endpoint does almost nothing).Signals triggered by the server can be processed as other Celery tasks and as Javascript functions on the browser.
WebSocket Client was built to be easy to use when you need it, and easy to hide when you don’t. No terminal commands that are hard to remember, no browser extensions that’s hard to reach and no applications that keeps getting in your way.
Requirements and installation
df_config works with:
- Python 3.6+,
- django 2.0+,
- celery 4.0+,
- redis,
- django-channels 2.0+,
- channels_redis.
You also need a working redis server and Celery setup.
In your settings, if you do not use
df_config
, you must add the following values:If you use
df_config
and you use a local Redis, you have nothing to do: settings are automatically set and everything is working as soon as a Redis is running on your machine.You can start a Celery worker and the development server:
basic usage
A signal is a string attached to Python or Javascript functions. When this signal is triggered, all these functions are called.Of course, you can target the platforms on which the functions will be executed: the server (for Python code) or any set of browser windows.
First, we connect our code to the signal
'myproject.first_signal'
.Now, we can trigger this signal to call this functions.In both cases, both functions will be called on the server and in the browser window.
In this case, the
to
parameter targets both the server and the window.Php Websocket Client
topics
When the server triggers a signal, it can select if the signal is called on the server or on some browser windows.
A Django view using this signal system must call
set_websocket_topics
to add some ”topics” to this view.js/df_websockets.min.js
must also be added to the resulting HTML.obj1
, obj2
, obj3
must be Python objects that are handled by the WEBSOCKET_TOPIC_SERIALIZER
function. By default, any string and Django model are valid.Each window also has a unique identifier that is automatically added to this list, as well as the connected user id and the BROADCAST
.The following code will call the JS function on every browser window having the
obj
topic and to the displayed window.There are three special values:
df_websockets.tasks.WINDOW
: the original browser window,df_websockets.tasks.USER
: all windows currently displayed by the connected user,df_websockets.tasks.BROADCAST
: all windows currently active.
Some information about the original window (like its unique identifier or the connected user) must be provided to the triggered Python code, allowing it to trigger JS events on any selected window.
These data are stored in the
These data are stored in the
WindowInfo
object, automatically built from the HTTP request by the trigger function and provided as first argument to the triggered code.The trigger
function accepts WindowInfo
or HTTPRequest
objects as first argument.Websocket Client For Macos X
Testing signals
![Websocket Client For Macos Websocket Client For Macos](/uploads/1/2/6/6/126614217/927776247.png)
The signal framework requires a working Redis and a worker process. However, if you only want to check if a signalhas been called in unitary tests, you can use :class:
df_websockets.utils.SignalQueue
.Both server-side and client-side signals are kept into memory:df_websockets.testing.SignalQueue.ws_signals
,- keys are the serialized topics
- values are lists of tuples
(signal name, arguments as dict)
df_websockets.testing.SignalQueue.python_signals
- keys are the name of the queue
- values are lists of
(signal_name, window_info_dict, kwargs=None, from_client=False, serialized_client_topics=None, to_server=False, queue=None)
signal_name
is … the name of the signalwindow_info_dict
is a WindowInfo serialized as a dict,kwargs
is a dict representing the signal arguments,from_client
isTrue
if this signal has been emitted by a web browser,serialized_client_topics
is notNone
if this signal must be re-emitted to some client topics,to_server
isTrue
if this signal must be processed server-side,queue
is the name of the selected Celery queue.
Release historyRelease notifications | RSS feed
0.9.2
0.9.1
Websocket Client For Macos 7
0.9.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size df_websockets-0.9.2.tar.gz (43.7 kB) | File type Source | Python version None | Upload date | Hashes |
Websocket Client For Macos Windows 7
CloseHashes for df_websockets-0.9.2.tar.gz
Websocket Client For Macos Mac
Algorithm | Hash digest |
---|---|
SHA256 | 9c6b05d66adcd06fda23da4b631d86b5586a997ea1863d5df2d4cf31631a5847 |
MD5 | 4bd4fcce152243ee00123cdf1c45598a |
BLAKE2-256 | b505632225011c7c9482ad6e27903d77a81315debf48bb3e5087c4ac9fba42c3 |