Category : udp

I’m finally extremely close to successfuly sending video frames through sockets and i have this error: Exception in Tkinter callback Traceback (most recent call last): File "C:UserseitanAnaconda3libtkinter__init__.py", line 1705, in __call__ return self.func(*args) File "C:UserseitanAnaconda3libtkinter__init__.py", line 749, in callit func(*args) File "E:/Chat/ex_client.py", line 50, in video_stream send_msg(bytes_frame) File "E:/Chat/ex_client.py", line 24, in send_msg msg, add ..

Read more

I have an application that meeds to: talks in UDP support optionally disabling multicast. treat multicast message the same way as unicast message but with few restrictions I thought I should use same UDP socket to receive both unicast and multicast datagrams. # udp_multicast_recv.py # Python version used: 3.9.1 import socket import struct host = ..

Read more

I am trying to send UDP broadcast messages, but I have issue with the address to use. If I run: import socket s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) s.sendto("hello broadcast".encode("ascii"), ("<broadcast>", 1500)) s.sendto("hello 11".encode("ascii"), ("192.168.1.11", 1500)) s.sendto("hello 255".encode("ascii"), ("192.168.1.255", 1500)) s.sendto("hello 255.255".encode("ascii"), ("192.168.255.255", 1500)) s.sendto("hello 255.255.255".encode("ascii"), ("192.255.255.255", 1500)) s.sendto("hello 255.255.255.255".encode("ascii"), ("255.255.255.255", 1500)) and log ..

Read more

I’m trying to send a broadcast msg from my server to the clients that currently running on localhost. This is the code from the server. self.sockUDP.sendto(msg, (‘255.255.255.255’,6789)) And this is the code from the client: self.sockUDP = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.sockUDP.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) broadcastMsg,serverAddr = self.sockUDP.recvfrom(4096) But I get nothing from the server. If I change ..

Read more