- A python implementation of a chat app using TCP sockets with Async I/O
- In order to use this program, make sure you have python 3.6 and above already installed on the system.
Open a terminal and run the following command:
python3 -m pip install aioconsole
Launch terminal and navigate to the PYCHAT directory.
Run the following command:
python3 chat.py 4000
- 4000 is the port number, feel free to choose another valid port number
-
help: Display information about the available user interface options or command manual.
Command Line Usage:
help <function_name>
> help myip
-
myip: Display the IP address of this process. Note: The IP should not be your “Local” address (127.0.0.1). It should be the actual IP of the computer.
Command Line Usage:
myip
> myip 192.168.1.8
-
myport: Display the port on which this process is listening for incoming connections.
Command Line Usage:
myport
> myport 5000
-
connect: This command establishes a new TCP connection to the specified
<destination>
at the specified<port no>
. The<destination>
is the IP address of the computer.Command Line Usage:
connect <destination> <port no.>
> connect 192.168.1.8 5000
-
list: Display a numbered list of all the connections this process is part of.
Command Line Usage:
list
> list
-
terminate: This command will terminate the connection listed under the specified number when LIST is used to display all connections.
Command Line Usage:
terminate <id>
> terminate 2
-
send: This command will send message to the host specified by
<id>
Command Line Usage:
send <id>
> send 3 Oh! This project is a piece of cake
-
exit: Closes all the connections and terminate this process.
Command Line Usage:
exit
- Austin Vargason:
- Created Async sockets
- Created functions/commands: connect, send, terminate, list, myport and terminate
- Manage dependencies
- Mayank Saboo:
- Made server socket to reuse it's address so hosts can connect same server
- Created function/commands: exit, list, myip
- Created README