# 服务器-客户端(聊天) **Repository Path**: agul12138/server-client-chat ## Basic Information - **Project Name**: 服务器-客户端(聊天) - **Description**: C语言编写的聊天服务器与相应客户端 - **Primary Language**: C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2024-08-29 - **Last Updated**: 2024-08-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Server client (ChAT) #### Introduction Chat server and corresponding client written in C language can run chat on different devices, environment deepin 15.1 Server, client, chat #### Software architecture Multithreading Socket communication #### Compiling tutorials 1. compile the server.c With command ```shell gcc server.c -pthread -o server ``` 2. compile client.c With command ```shell gcc client.c -pthread -o client ``` ![编译过程](https://images.gitee.com/uploads/images/2021/0705/145711_5743d47e_2346419.png "屏幕截图.png") #### Instructions for use First, use the command: ifconfig to obtain the local IP (server IP) ```shell ifconfig ``` 1. run the server program at the terminal ``` ./server ``` 2. run the client program on other terminals: my IP is 192.168.73.132 ``` ./client 192.168.73.132 ``` ![运行结果](https://images.gitee.com/uploads/images/2021/0705/150025_0b88f5fa_2346419.png "屏幕截图.png") Enter quit in the client to exit Ctrl-Z directly in the server