خرید بک لینک

I wrote 2 programs in Python. One creates a host socket while the other one creates a client socket. Then they try to coect. I had my host program on my PC and put my client program on my phone that was coected to the WIFI on the same network as my PC. I set the client program to coect to local IP address of my PC. I checked for flaws in my code and found out it is flawless. However when I tried to run it, I got some very strange behaviour in retu:

  1. Port is correct. Hostname is correct. I try to coect. Nothing happens. No coection is established.
  2. I reset my PC.
  3. I try it again. Same result.
  4. I tu off both my local and public firewall.
  5. Now i get something, but only on my client device: [Ero 111] Coection refused.
  6. I tu my firewalls back on.
  7. Same result as in 1.
  8. I run the host program on my laptop. I try to coect. It works!
  9. I reset my router and run my host program on the PC again. Same result as in 1.
  10. I now run the client program on my PC as well, coecting it to "localhost". It works.
  11. I do the same as in 10. setting the client program to coect to my PCs local IP address again. Error:

    Traceback (most recent call last):
      File "<pyshell#5>", line 1, in <module>
        s.coect(cn)
      File "C:Python27libsocket.py", line 224, in meth
        retu getattr(self._sock,name)(*args)
    error: [Ero 10060] A coection attempt failed because the coected party did not properly respond after a period of time, or established coection failed because coected host has failed to respond
    
    

In 6. I came to the conclusion that the problem is related to the PC and that my programs work fine.

Some intels:

  • Windows 7 on both PC and laptop.
  • I am using Python 2.7.
  • Laptop and smartphone are coected into network via WIFI, PC via cabel.
  • I tried different ports to make sure they were not the problem.

What is going on? Thank you for your answers.

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 12 ارديبهشت 1395 ساعت: 6:57

صفحه بندی