|
Methods defined here:
- __init__(self, host='', port=5204)
- Creates a server socket with the specified host and port number.
Sets the socket to non-blocking, and sets it to listen for connections.
@param host: The host address. Default value: ''
(gives the socket local address)
@param port: The port number. Default value: 5204
(the port number of the majority of python applications)
@return: none
- checkIncomingConnections(self)
- Accepts a waiting socket connection and add it to the list of clients
to send information to. If there is no waiting connection, do nothing.
(This is a non-blocking call.)
@return: none
- sendInformation(self, message)
- Sends the specified message to every socket connection (every item of self.clients).
If a connection has exited, catch the error and remove it from the list.
@param message: The message to send to each waiting client.
@return: none
Data and other attributes defined here:
- clients = []
- host = None
- message = None
- port = 0
- server_socket = None
|