twisted Package

twisted Package

base Module

node Module

websocket Module

class ebu_tt_live.twisted.websocket.BroadcastClientFactory(url, consumer=None, producer=None, *args, **kwargs)[source]

Bases: ebu_tt_live.twisted.websocket.BroadcastFactoryCommon, autobahn.twisted.websocket.WebSocketClientFactory

connect()[source]
register(client)[source]
unregister(client)[source]
class ebu_tt_live.twisted.websocket.BroadcastClientProtocol[source]

Bases: ebu_tt_live.twisted.websocket.EBUWebsocketProtocolMixin, autobahn.twisted.websocket.WebSocketClientProtocol

connectionLost(reason)[source]

Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.

@type reason: L{twisted.python.failure.Failure}

onMessage(payload, isBinary)[source]

Implements autobahn.websocket.interfaces.IWebSocketChannel.onMessage()

onOpen()[source]

Implements autobahn.websocket.interfaces.IWebSocketChannel.onOpen()

sendSequenceMessage(sequence_identifier, payload, isBinary=False, fragmentSize=None, sync=False, doNotCompress=False)[source]
class ebu_tt_live.twisted.websocket.BroadcastFactoryCommon[source]

Bases: object

consumer
producer
class ebu_tt_live.twisted.websocket.BroadcastServerFactory(url=None, producer=None, consumer=None)[source]

Bases: ebu_tt_live.twisted.websocket.BroadcastFactoryCommon, autobahn.twisted.websocket.WebSocketServerFactory

listen()[source]
real_port_number = None
register(client)[source]
stopFactory()[source]

This will be called before I stop listening on all Ports/Connectors.

This can be overridden to perform ‘shutdown’ tasks such as disconnecting database connections, closing files, etc.

It will be called, for example, before an application shuts down, if it was connected to a port. User code should not call this function directly.

unregister(client)[source]
class ebu_tt_live.twisted.websocket.BroadcastServerProtocol[source]

Bases: ebu_tt_live.twisted.websocket.EBUWebsocketProtocolMixin, autobahn.twisted.websocket.WebSocketServerProtocol

connectionLost(reason)[source]

Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.

@type reason: L{twisted.python.failure.Failure}

onMessage(payload, isBinary)[source]

Implements autobahn.websocket.interfaces.IWebSocketChannel.onMessage()

onOpen()[source]

Implements autobahn.websocket.interfaces.IWebSocketChannel.onOpen()

sendSequenceMessage(sequence_identifier, payload, isBinary=False, fragmentSize=None, sync=False, doNotCompress=False)[source]
class ebu_tt_live.twisted.websocket.EBUWebsocketProtocolMixin[source]

Bases: object

This mixin exists because the WS protocol suggested in EBU-3370s1 is agnostic of client-server relationship in the sense that data can be streamed from client to server or the other way around. Based on which action a server/client is doing different functions should be available. This class holds the common logic.

action
consumer
class ebu_tt_live.twisted.websocket.LegacyBroadcastClientFactory(url, consumer, channels=None, *args, **kwargs)[source]

Bases: autobahn.twisted.websocket.WebSocketClientFactory

channels
connect()[source]
dataReceived(data)[source]
pauseProducing()[source]
resumeProducing()[source]
stopProducing()[source]
class ebu_tt_live.twisted.websocket.LegacyBroadcastClientProtocol[source]

Bases: autobahn.twisted.websocket.WebSocketClientProtocol

onMessage(payload, isBinary)[source]

Implements autobahn.websocket.interfaces.IWebSocketChannel.onMessage()

onOpen()[source]

Implements autobahn.websocket.interfaces.IWebSocketChannel.onOpen()

subscribeChannel(channel)[source]
unsubscribeChannel(channel)[source]
class ebu_tt_live.twisted.websocket.LegacyBroadcastServerFactory(url)[source]

Bases: autobahn.twisted.websocket.WebSocketServerFactory

broadcast(channel, msg)[source]
listen()[source]
pull()[source]
register(client)[source]
registerProducer(producer, streaming)[source]
stopFactory()[source]

This will be called before I stop listening on all Ports/Connectors.

This can be overridden to perform ‘shutdown’ tasks such as disconnecting database connections, closing files, etc.

It will be called, for example, before an application shuts down, if it was connected to a port. User code should not call this function directly.

unregister(client)[source]
unregisterProducer()[source]
write(channel, data)[source]
class ebu_tt_live.twisted.websocket.LegacyBroadcastServerProtocol[source]

Bases: autobahn.twisted.websocket.WebSocketServerProtocol

connectionLost(reason)[source]

Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.

@type reason: L{twisted.python.failure.Failure}

onMessage(payload, isBinary)[source]

Implements autobahn.websocket.interfaces.IWebSocketChannel.onMessage()

onOpen()[source]

Implements autobahn.websocket.interfaces.IWebSocketChannel.onOpen()

sendMessageOnChannel(channel, payload, isBinary=False, fragmentSize=None, sync=False, doNotCompress=False)[source]
class ebu_tt_live.twisted.websocket.TwistedConsumer(custom_consumer)[source]

Bases: object

registerProducer(producer, streaming)[source]
unregisterProducer()[source]
write(data)[source]
class ebu_tt_live.twisted.websocket.TwistedPullProducer(consumer, custom_producer)[source]

Bases: object

emit_data(channel, data, delay=None)[source]
resumeProducing()[source]
stopProducing()[source]
class ebu_tt_live.twisted.websocket.TwistedWSConsumer(custom_consumer)[source]

Bases: object

This class wraps the protocol objects.

real_port_number = None
register(connection)[source]
registerProducer(producer, streaming)[source]
unregister(connection)[source]
unregisterProducer()[source]
write(data, **kwargs)[source]
class ebu_tt_live.twisted.websocket.TwistedWSPushProducer(custom_producer)[source]

Bases: object

This is a Twisted Push producer. The concept is related to twisted and it is not the same as our producer and consumer nodes.

emit_data(sequence_identifier, data, delay=None)[source]
pauseProducing()[source]
real_port_number = None
register(connection)[source]
resumeProducing()[source]
stopProducing()[source]
unregister(connection)[source]
class ebu_tt_live.twisted.websocket.UserInputServerFactory(url, consumer)[source]

Bases: autobahn.twisted.websocket.WebSocketServerFactory

listen()[source]
register(client)[source]
resumeProducing()[source]
unregister(client)[source]
write(data)[source]
class ebu_tt_live.twisted.websocket.UserInputServerProtocol[source]

Bases: autobahn.twisted.websocket.WebSocketServerProtocol

connectionLost(reason)[source]

Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.

@type reason: L{twisted.python.failure.Failure}

onMessage(payload, isBinary)[source]

Implements autobahn.websocket.interfaces.IWebSocketChannel.onMessage()

onOpen()[source]

Implements autobahn.websocket.interfaces.IWebSocketChannel.onOpen()

sendMessage(payload, isBinary=False, fragmentSize=None, sync=False, doNotCompress=False)[source]

Implements autobahn.websocket.interfaces.IWebSocketChannel.sendMessage()