To'g'ri! Python-da soketlar ikki kompyuter o'rtasida aloqa qilish uchun ishlatiladi. Buni amalga oshirish uchun soket kutubxonasi ishlatiladi. Bizning misolimizda ikkita qism bor: server va mijoz. Server mijozning ulanishini kutadi va mijoz serverga ulanadi. Server: import socket server_socket = socket.socket.socket.AF_INET, socket.SOCK_STREAM) host = '127.0.0.1' port = 12345 server_socket.bind.((host, port)) server_socket.listen.(1) print"Server kutib turibdi...") client_socket, addr = server_socket.accept) printf ((("Client from {addr} connected") client_socket.socket.close) server_socket.cl
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence