src.server.client package¶
Submodules¶
src.server.client.client module¶
Module containing Client and Clients class.
-
class
src.server.client.client.
Client
(*args)[source]¶ Bases:
object
Class representing single client connecting to the server.
-
ep
¶ Endpoint tuple.
-
src.server.client.connection module¶
Module containing Connection and Connections classes.
-
class
src.server.client.connection.
Connection
(c1, c2=None)[source]¶ Bases:
object
Class representing single connection.
-
class
src.server.client.connection.
Connections
[source]¶ Bases:
list
Class representing list of connections between clients. Connections are stored as server.client.connection.Connection objects. There should not be more than one one-end connection in the Connections list at once. This is considered as improper behaviour. Extends list type.
-
add_client
(client)[source]¶ Add new client.
Add new pong_client to the list of connections, either by creating new one-end connection for that particular cilent and appending it to the list in regular way, or by matching the pong_client with some previously connected one, depending on whether there is some one-end connection present.
Parameters: client – client to add Returns: tuple containing both of the newly connected players if the addition was performed by inserting the client into existing connection, None if the addition was performed by appending the new one-end connection to the list.
-
Module contents¶
Package containing all client-connected utilities for the server. This includes client and connection representations as objects.