evennia.server.game_index_client.client

The client for sending data to the Evennia Game Index

class evennia.server.game_index_client.client.EvenniaGameIndexClient(on_bad_request=None)[source]

Bases: object

This client class is used for gathering and sending game details to the Evennia Game Index. Since EGI is in the early goings, this isn’t incredibly configurable as far as to what is being sent.

__init__(on_bad_request=None)[source]

on_bad_request (callable, optional): Callable to trigger when a bad request was sent.

send_game_details()[source]

This is where the magic happens. Send details about the game to the Evennia Game Index.

handle_egd_response(response)[source]
class evennia.server.game_index_client.client.SimpleResponseReceiver(status_code, d)[source]

Bases: twisted.internet.protocol.Protocol

Used for pulling the response body out of an HTTP response.

__init__(status_code, d)[source]

Initialize self. See help(type(self)) for accurate signature.

dataReceived(data)[source]

Called whenever data is received.

Use this method to translate to a higher-level message. Usually, some callback will be made upon the receipt of each complete protocol message.

@param data: a string of indeterminate length. Please keep in mind

that you will probably need to buffer some data, as partial (or multiple) protocol messages may be received! I recommend that unit tests for protocols call through to this method with differing chunk sizes, down to one byte at a time.

connectionLost(reason=<twisted.python.failure.Failure twisted.internet.error.ConnectionDone: Connection was closed cleanly.>)[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}

class evennia.server.game_index_client.client.StringProducer(body)[source]

Bases: object

Used for feeding a request body to the tx HTTP client.

__init__(body)[source]

Initialize self. See help(type(self)) for accurate signature.

startProducing(consumer)[source]
pauseProducing()[source]
stopProducing()[source]
class evennia.server.game_index_client.client.QuietHTTP11ClientFactory(quiescentCallback, metadata)[source]

Bases: twisted.web.client._HTTP11ClientFactory

Silences the obnoxious factory start/stop messages in the default client.

noisy = False