Continue making HW5 work... fix the client issue hopefully?
This commit is contained in:
parent
61c5acbcfa
commit
d157cf8189
2 changed files with 131 additions and 203 deletions
|
|
@ -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'))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue