NetworkConnection Module
========================

.. py:function:: connect(address, port)

   Connect to a server at the specified address.
	     
   :param address: The address of a server.
   :param port: The port the server is listening on
   :type address: string
   :type port: int
   :return: The connection to the server.
   :rtype: _NetworkConnection

.. py:function:: accept(port)

   Accepts a connection from a client.

   :param port: The port to accept connections over
   :type port: integer
   :return: The connection from the client.
   :rtype: _NetworkConnection

.. py:class:: _NetworkConnection

   "Hidden" class that handles the inner workings of a network connection.

   .. py:method:: send(message)

      Sends a string message over the connection.
			     
      :param message: a string to send over the connection.
      :type message: string
					
   .. py:method:: receive()

      Recieve a line of text from the socket.

      :return: A message from the socket
      :rtype: string

   .. py:method:: close()

      Close all connections.

   .. py:method:: connected()
      
      States whether the current connection is valid.

      :return: True if the connection is valid.
      :rtype: boolean