-
compile chatclient.c
gcc chatclient.c -o chatclient
-
Make sure chatserve has permission to execute
chmod +x chatserve
-
Run
./chatserve x
with x as the port number -
Run chatclient
./chatclient hostname port# Hostname is hostname where chatserve is running, for example flip1. port# is the port chatserve is on.
-
Enter handle name for both server and client
-
chatclient must send message first. Client and server takes turns sending messages.
-
To end connection, type
\quit
in either client or server. -
To exit the client or server program, press
Ctrl+C