Open utterances-bot opened 12 months ago
socket udp server 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 import socket def socket_udp_server(server_ip: str = '0.0.0.0', server_port: int = 9000, buffer_size: int = 1024): """ socket udp 服务端 :param server_ip: 服务器的地址, 默认为0.0.0.0, 表示允许所有 :param server_port: 服务器udp server接收信息的端口, 默认9000 :param buffer_size: 套接字缓冲区大小, 默认1024 :return: none """ udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) udp_socket.bind((
https://blog.justmylife.cc/p/python3-socket-udp-example/
Hello, world!
python3 socket udp example
socket udp server 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 import socket def socket_udp_server(server_ip: str = '0.0.0.0', server_port: int = 9000, buffer_size: int = 1024): """ socket udp 服务端 :param server_ip: 服务器的地址, 默认为0.0.0.0, 表示允许所有 :param server_port: 服务器udp server接收信息的端口, 默认9000 :param buffer_size: 套接字缓冲区大小, 默认1024 :return: none """ udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) udp_socket.bind((
https://blog.justmylife.cc/p/python3-socket-udp-example/