libgpac
Documentation of the core library of GPAC
python.libgpac.libgpac.RMTHandler Class Reference

RMTHandler object handling the callbacks for rmtws events. More...

Public Member Functions

def on_new_client (self, RMTClient client)
 called when a new client connects to the websocket More...
 
def on_client_close (self, RMTClient client)
 called when a client disconnects from the websocket More...
 
def on_client_data (self, RMTClient client, data)
 called when a client receives data on its websocket More...
 

Detailed Description

RMTHandler object handling the callbacks for rmtws events.

to be passed to set_rmt_handler()

Member Function Documentation

◆ on_new_client()

def python.libgpac.libgpac.RMTHandler.on_new_client (   self,
RMTClient  client 
)

called when a new client connects to the websocket

Parameters
clientan object of type RMTClient representing the new client

◆ on_client_close()

def python.libgpac.libgpac.RMTHandler.on_client_close (   self,
RMTClient  client 
)

called when a client disconnects from the websocket

Parameters
clientan object of type RMTClient representing the client

◆ on_client_data()

def python.libgpac.libgpac.RMTHandler.on_client_data (   self,
RMTClient  client,
  data 
)

called when a client receives data on its websocket

Parameters
clientan object of type RMTClient representing the client
datathe received data, can be either str or bytes depending on the exchanged data