- To test the client, you need to run the ws_chat_client.py file by this command:
python3 ws_chat_client.py <host> <port> <role> <-v> <-t time> <host>could be localhost if you run the server on your local computer or owl.cs.umanitoba.ca if you want to test with the server is running on aviary machine<port>could be 8001 since this is the port our instructors use to run the server, if you run the server on local machine, make sure you set the port to 8001 too<role>could be one of[consumer, producer, both].- If you choose
consumer, you will expect to wait for the server to send messagePINGto client and client will sendPONGback to server and you will see it in the terminal where the client code is running - If you choose
producer, you will expect to see the client ask for your message in terminal while its running and after client send your message to server, you will see the server print out thatReceived message from (<host>, <port>). You can also sendPINGto server or sendCLOSEto server to close the connection and the server will print out(<host>, <port>): Client closed the connection.If you leave the client with give any input message, after an amount of time, the server will send back(<host>, <port>): Server closed the connectionand client will echo back and close. - If you choose
both, you will expect to see client will ask for your message and you can also seePINGmessages from the server concurrently.
- If you choose
<-v>for verbose, it help you to determine if you want to useprint_above_prompt()function fromconsolelib.pyfile<-t time>for timeout, time is number of seconds that you want to wait for responses from server.
-
Notifications
You must be signed in to change notification settings - Fork 0
Luke1401/WebSocket-Client
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published