Here's an example code snippet that uses the IP address "190.168.1.10" and port number "54321", and sends a message from the Server to the Client when the Client connects:

Server:

import socket

server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

host = '190.168.1.10'
port = 54321
server_socket.bind((host, port))

server_socket.listen(1)
print("Server is waiting...")

client_socket, addr = server_socket.accept()
print(f"Client connected from {addr}")

message = "Hello client, welcome!"
client_socket.send(message.encode())

client_socket.close()
server_socket.close()

Client:

import socket

client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

host = '190.168.1.10'
port = 54321
client_socket.connect((host, port))
print("Connected to server!")

message = client_socket.recv(1024).decode()
print(message)

client_socket.close()
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence