webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Functions
webkitpy.thirdparty.mod_pywebsocket.msgutil Namespace Reference

Classes

class  MessageReceiver
 
class  MessageSender
 

Functions

def close_connection (request)
 
def send_message (request, payload_data, end=True, binary=False)
 
def receive_message (request)
 
def send_ping (request, body='')
 

Function Documentation

◆ close_connection()

def webkitpy.thirdparty.mod_pywebsocket.msgutil.close_connection (   request)
Close connection.

Args:
    request: mod_python request.

◆ receive_message()

def webkitpy.thirdparty.mod_pywebsocket.msgutil.receive_message (   request)
Receive a WebSocket frame and return its payload as a text in
unicode or a binary in str.

Args:
    request: mod_python request.
Raises:
    InvalidFrameException:     when client send invalid frame.
    UnsupportedFrameException: when client send unsupported frame e.g. some
                               of reserved bit is set but no extension can
                               recognize it.
    InvalidUTF8Exception:      when client send a text frame containing any
                               invalid UTF-8 string.
    ConnectionTerminatedException: when the connection is closed
                               unexpectedly.
    BadOperationException:     when client already terminated.

◆ send_message()

def webkitpy.thirdparty.mod_pywebsocket.msgutil.send_message (   request,
  payload_data,
  end = True,
  binary = False 
)
Send a message (or part of a message).

Args:
    request: mod_python request.
    payload_data: unicode text or str binary to send.
    end: True to terminate a message.
         False to send payload_data as part of a message that is to be
         terminated by next or later send_message call with end=True.
    binary: send payload_data as binary frame(s).
Raises:
    BadOperationException: when server already terminated.

◆ send_ping()

def webkitpy.thirdparty.mod_pywebsocket.msgutil.send_ping (   request,
  body = '' 
)