title: Python socket connection not working properly
body: <p>Included below is the code that I am currently using:</p>
  
  <pre><code>soc1 = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
  ADDR = (HOST,PORT)
  soc1.connect(ADDR)
  soc1.send('WILL SEND')   
  </code></pre>
  
  <p>The error message that I receive when running the above code is:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\workspace\wx_python_test\chat_server.py", line 25, in &lt;module&gt;
      soc1.connect(ADDR)
    File "C:\Python27\lib\socket.py", line 224, in meth
      return getattr(self._sock,name)(*args)
  socket.error: [Errno 10061] 
  </code></pre>
  
  <p>Could anyone please explain what the issue is that I am experiencing and how I can correct it?</p>
  
  <p>Full source code: <a href="http://pastie.org/4245314" rel="nofollow">http://pastie.org/4245314</a></p>