Continue making HW5 work... fix the client issue hopefully?

This commit is contained in:
Charles Descamps 2025-04-21 19:14:17 -07:00
parent 61c5acbcfa
commit d157cf8189
2 changed files with 131 additions and 203 deletions

View file

@ -32,6 +32,10 @@ def main():
client_socket.connect((SERVER_HOST, SERVER_PORT))
print(f"Connected to chat server at {SERVER_HOST}:{SERVER_PORT}")
# Prompt user for a username and send it to the server
username = input("Enter your username: ").strip()
client_socket.send(username.encode('utf-8'))
# Send the local path to the server
client_socket.send(f"SET_PATH {local_path}".encode('utf-8'))