I have a simple UDP server implemented in python:
import socket sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.bind(("",10005)) while True: data = sock.recv(1024)
I run this code on computer A. I send UDP commands from computer B in the following two situations:
- Both A and B are connected to the router on the LAN via a LAN cable.
- Both A and B are connected to the router via Wi-Fi.
UDP packets are received in situation 1 (LAN cable), but not in situation 2 (via Wi-Fi). In both cases, Wireshark shows the received packet on computer A. Any thoughts?
OS: Windows
Client program:
import socket sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.sendto(char,("192.168.1.107",10005)) sock.close()
I went to find a solution. Windows removes UDP packets. I checked with the netstat -s -p UDP command. Whenever the sending computer sends UDP packets, receiving errors increase. Now I just need to find out why the packets are being mistaken.
Edit I tested it on other computers. It is working. I turned on the firewall on the computer where it does not work, but still cannot figure out what the UDP packet is filtering.
source share