16
Sử dụng Linux và Python, tôi muốn gửi một số dữ liệu với phát sóng:Python socket.error: [Errno 13] Permission denied
d = b'109u433279423423423'
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.sendto(d, 0, ('192.168.0.255', 9))
tôi khởi động kịch bản này dưới gốc và nhận được lỗi này:
s.sendto(d, 0, ('192.168.0.255', 9)) socket.error: [Errno 13]
Permission denied
Điều gì là sai?
Cảm ơn. Thật lạ khi nó hoạt động bình thường trên Windows – atomAltera
Nó luôn giống như thế này trên Windows: lạ – fork0
Thông số kỹ thuật UNIX: sendto - gửi một thông điệp trên một socket: http://pubs.opengroup.org/onlinepubs/009695399/functions/sendto.html – fork0