python-websocketd
Python module for creating a http server which uses WebSockets.
|
Remote Procedure Call over Websocket. More...
Classes | |
class | _wrapper |
Public Attributes | |
groups | |
Groups are used to do selective broadcast() events. More... | |
![]() | |
recv | |
mask | |
websockets | |
websocket_buffer | |
websocket_fragments | |
opcode | |
socket | |
remote | |
data | |
Additional Inherited Members | |
![]() | |
def | send (self, data, opcode=1) |
Send a Websocket frame to the remote end of the connection. More... | |
def | ping (self, data=b'') |
Send a ping, return if a pong was received since last ping. More... | |
def | close (self) |
Send close request, and close the connection. More... | |
def | opened (self) |
This function does nothing by default, but can be overridden by the application. More... | |
def | closed (self) |
This function does nothing by default, but can be overridden by the application. More... | |
Remote Procedure Call over Websocket.
This class manages a communication object, and on the other end of the connection a similar object should exist. When calling a member of this class, the request is sent to the remote object and the function is called there. The return value is sent back and returned to the caller. Exceptions are also propagated. Instead of calling the method, the item operator can be used, or the event member: obj.remote_function(...) calls the function and waits for the return value; obj.remote_function[...] or obj.remote_function.event(...) will return immediately and ignore the return value.
If no communication object is given in the constructor, any calls that the remote end attempts will fail.
Definition at line 480 of file websocketd.py.