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]¶ - Parameters
on_bad_request – Optional callable to trigger when a bad request was sent. This is almost always going to be due to bad config.
-
-
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.
-
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}
-