eCho is a TCP server/client implementation which was created by following Beej's Guide to Network Programming
The default address is set to the loopback address, I recommend not changing it, nor using this for anything other than for educational purposes.
- Compile using:
clang src/server.c -o server -Wall -Wextra -pedantic -std=gnu99`
- Run by:
./server
- The Server automatically starts listening on port 10250 and is ready to accept the Client joining.
- If a Client joins the Server will enter transmission mode until we have a Client present.
- If the Client aborts its connection, the Server continues listening, hence close the connection by using CTRL+C
-
Make sure the Server is already listening without any problems, otherwise Client will fail to connect.
-
Compile using:
clang src/client.c -o client -Wall -Wextra -pedantic -std=gnu99
2: Run by:
./client
- The client can now be used to transmit shorter messages
- Once finished, you can close Client by using CTRL+C and connection to the Server will end.
- You can connect again as the Server continues listening, check that out too!