title: Python socket [WinError 10057]?
body: <p>I am getting [WinError 10057] when I am running this code. And I have no idea why it's crashing when I browse to <code>localhost:8081</code> since the same code is working on my friends machine...</p>
  <pre><code>import socket
  
  sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  sock.bind((&quot;&quot;, 8081))
  sock.listen(2)
  conn, addr = sock.accept()
  
  ans = conn.recv(1024).decode(&quot;ascii&quot;)  
  sock.sendall(bytearray(&quot;HTTP/1.1 200 ok\n&quot;, &quot;ascii&quot;))
  sock.sendall(bytearray(&quot;\n&quot;, &quot;ascii&quot;))
  sock.sendall(bytearray(&quot;&lt;html&gt;\n&lt;body&gt;&lt;h1&gt;Your request&lt;/h1&gt;&lt;p&gt;Your client sent this request&lt;/p&gt;&lt;pre&gt;&quot; + ans +&quot;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;&quot;, &quot;ascii&quot;))
  sock.close()
  </code></pre>
  <p>Why am I getting this error? Been searching around but can't really find an answer. Any suggestions?</p>