Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×

Creating UDP Broadcast App Using Python Socket on WIndows & Linux

Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio

Eche un vistazo a continuación

1 de 8 Anuncio

Creating UDP Broadcast App Using Python Socket on WIndows & Linux

Descargar para leer sin conexión

This short slides demonstrating how to create simple UDP broadcast app using Python Socket on WIndows & Linux. There are some important notes, especially when writing Python script on different OS/kernel (On Windows, you need to bind network interface IP, while on Linux you should use SO_REUSEPORT, unless you're using kernel <3.9..change to SO_REUSEADDR)

This short slides demonstrating how to create simple UDP broadcast app using Python Socket on WIndows & Linux. There are some important notes, especially when writing Python script on different OS/kernel (On Windows, you need to bind network interface IP, while on Linux you should use SO_REUSEPORT, unless you're using kernel <3.9..change to SO_REUSEADDR)

Anuncio
Anuncio

Más Contenido Relacionado

Presentaciones para usted (20)

Similares a Creating UDP Broadcast App Using Python Socket on WIndows & Linux (20)

Anuncio

Más de Dony Riyanto (20)

Más reciente (20)

Anuncio

Creating UDP Broadcast App Using Python Socket on WIndows & Linux

  1. 1. Creating UDP Broadcast App Using Python Socket on Windows & Linux Dony Riyanto June 2021 Telegram: @donyriyanto slideshare.net/donyriyanto
  2. 2. Receiver.py
  3. 3. Notes: • SO_REUSEPORT enable port reusage so we will be able to run multiple clients and servers on single (host, port). Do not use socket.SO_REUSEADDR except you using linux(kernel<3.9): goto https://stackoverflow.com/questions/14388706/how-do-so- reuseaddr-and-so-reuseport-differ for more information. • For linux hosts all sockets that want to share the same address and port combination must belong to processes that share the same effective user ID! So, on linux(kernel>=3.9) you have to run multiple servers and clients under one user to share the same (host, port). Thanks to @stevenreddie • For Windows OS, it is important to bind it to network interface IP.
  4. 4. Sender.py Important for Windows OS
  5. 5. Testing Local Laptop Windows 7 192.168.1.19 PC Windows 7 192.168.1.12 VM in PC Ubuntu 18 192.168.1.11 (bridge) Local Area Network Succesfully on the same host
  6. 6. Testing Local Laptop Windows 7 192.168.1.19 PC Windows 7 192.168.1.12 VM in PC Ubuntu 18 192.168.1.11 (bridge) Local Area Network Succesfully on the different host, same OS version, LAN over WiFi
  7. 7. Testing Local Laptop Windows 7 192.168.1.19 PC Windows 7 192.168.1.12 VM in PC Ubuntu 18 192.168.1.11 (bridge) Local Area Network Succesfully on the different host, different OS, accros bridge network driver, LAN over WiFi

×