title: python TCP client can't connect to my TCP server
body: <p>I can run two instances of my program and connect them to each other, but when someone else at a different ip trys to connect to my server their socket fails to connect. My code doesn't have input the ip of the users computer, but has my ip(as I am going to be the only person running the server) hard coded in.</p>
  
  <p>Here is the server class connect function:</p>
  
  <pre><code>def connect(self,host,port):
      self.host = host
      self.port = port
      self.unconnected_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      self.unconnected_socket.bind((self.host,self.port))
      self.unconnected_socket.listen(5)
  </code></pre>
  
  <p>This is the when the program creates a game</p>
  
  <pre><code>self.server = server.Server()
  self.server.connect(ip,port) #ip is my computer's ip address
  self.serverThread = Thread(target=self.server.serve_forever)
  self.serverThread.daemon = True
  self.serverThread.start()
  self.client.connect(ip,port)
  </code></pre>
  
  <p>Now here is the class client connect function:</p>
  
  <pre><code>def connect(self,host,port):
      self.host = host
      self.port = port
      self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      self.socket.connect((self.host,self.port))
  </code></pre>
  
  <p>When someone on a different computer runs the program but chooses to join the game:</p>
  
  <pre><code>self.client.connect(ip,port)
  </code></pre>
  
  <p>I am using a slightly modified Mastermind Networking Lib - 1.5.2 from pygames.</p>