pytwitcherapi.chat.client.Reactor3

class pytwitcherapi.chat.client.Reactor3(on_connect=<function __do_nothing>, on_disconnect=<function __do_nothing>)[source]

Bases: pytwitcherapi.chat.client.Reactor

Reactor that uses irc v3 connections

Uses the ServerConnection3 class for connections. They support Event3 with tags.

__init__(on_connect=<function __do_nothing>, on_disconnect=<function __do_nothing>)

Initialize a reactor.

Parameters:
  • on_connect – optional callback invoked when a new connection is made.
  • on_disconnect – optional callback invoked when a socket is disconnected.

Methods

__init__([on_connect, on_disconnect]) Initialize a reactor.
add_global_handler(event, handler[, priority]) Adds a global handler function for a specific event type.
dcc([dcctype]) Creates and returns a DCCConnection object.
disconnect_all([message]) Disconnects all connections.
process_data(sockets) Called when there is more data to read on connection sockets.
process_forever([timeout]) Run an infinite loop, processing data from connections.
process_once([timeout]) Process data from connections once.
process_timeout() Called when a timeout notification is due.
remove_global_handler(event, handler) Removes a global handler function.
server() Creates and returns a ServerConnection
shutdown() Disconnect all connections and end the loop

Attributes

sockets
server()[source]

Creates and returns a ServerConnection

Returns:a server connection
Return type:connection.ServerConnection3
Raises:None