import socket

# Define the path to the Unix socket
socket_path = "./tmp/sock"

# Data to be sent
data = "hello"

try:
    # Create a socket object
    client_socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)

    # Connect to the Unix socket
    client_socket.connect(socket_path)

    # Send the data
    client_socket.send(data.encode())

    # Close the socket
    client_socket.close()

    print("Sent to the socket.")
except Exception as e:
    print("Error")


