transports Package

base Module

class thriftworker.transports.base.Acceptors[source]

Bases: thriftworker.utils.mixin.StartStopMixin, thriftworker.utils.mixin.LoopMixin

Maintain pool of acceptors. Start them when needed.

Acceptor[source]

Shortcut to thriftworker.acceptor.Acceptor class.

connections_number[source]

Return current connection number across all acceptors.

empty[source]

Are all acceptors empty or not.

register(fd, name, backlog=None)[source]

Register new acceptor in pool.

start_accepting()[source]

Start all registered acceptors if needed.

start_by_name(name)[source]

Start acceptor by name.

stop()[source]

Close all registered acceptors.

stop_accepting(callback=None)[source]

Stop all registered acceptors if needed.

stop_by_name(name)[source]

Stop acceptor by name.

class thriftworker.transports.base.BaseAcceptor(name, descriptor, backlog=None)[source]

Bases: abc.NewBase

Accept incoming connections.

Connection[source]

Return connection class. Depends on current implementation of transport.

class Connections

Bases: object

Store existed connections.

callback

Return callback if existed.

close()
register(connection)

Register new connection.

remove(connection)

Remove registered connection.

BaseAcceptor.acceptor[source]

Return function that should accept new connections.

BaseAcceptor.active[source]

Is current acceptor active.

BaseAcceptor.close[source]

Close all resources.

BaseAcceptor.connections_number[source]

Return number of active connections.

BaseAcceptor.empty[source]

Is acceptor empty or not.

BaseAcceptor.start[source]

Start acceptor if active.

BaseAcceptor.stop[source]

Stop acceptor if active.

class thriftworker.transports.base.Connections[source]

Bases: object

Store existed connections.

callback[source]

Return callback if existed.

close()[source]
register(connection)[source]

Register new connection.

remove(connection)[source]

Remove registered connection.

thriftworker.transports.base.ignore_eagain(*args, **kwds)[source]

Ignore all EAGAIN errors in context.

Read the Docs v: latest
Versions
latest
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.