SRV_ADDR = input("Server's IP: ")
SRV_PORT = int(input("TCP port to connect to: "))
# Creates print_menu function and outputs the different options
print("""\n\n0) Close the connection
2) List directory contents""")
# Creates socket that the client will use, defines it as TCP IPv4
my_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
my_sock.connect((SRV_ADDR, SRV_PORT))
print("Connection established")
message = input("\n-Select an option: ")
my_sock.sendall(message.encode())
my_sock.sendall(message.encode())
data = my_sock.recv(1024)
print(data.decode('utf-8'))
path = input("insert the path: ")
my_sock.sendall(message.encode())
my_sock.send(path.encode())
data = my_sock.recv(1024)
data = data.decode('utf-8').split(",")