socket-programming
所属分类:网络编程
开发工具:C
文件大小:0KB
下载次数:0
上传日期:2023-08-09 02:40:34
上 传 者:
sh-1993
说明: 套接字编程,,
(socket-programming,,)
文件列表:
socket-chat/ (0, 2023-12-22)
socket-chat/Makefile (142, 2023-12-22)
socket-chat/client.c (1581, 2023-12-22)
socket-chat/server.c (2156, 2023-12-22)
socket-sample/ (0, 2023-12-22)
socket-sample/.vscode/ (0, 2023-12-22)
socket-sample/.vscode/settings.json (105, 2023-12-22)
socket-sample/Makefile (129, 2023-12-22)
socket-sample/client.c (819, 2023-12-22)
socket-sample/server.c (969, 2023-12-22)
# socket-programming
## Real-time-chat-application-in-c
[![Open Source Love](https://img.shields.io/badge/Open%20Source-%E2%9D%A4-red.svg)](https://github.com/thuanln07/socket-programming)
Using Socket programming to make a real-time chatroom in c
## Note-:
1. The above code is tested for Linux, it should work with MAC-OS and windows but is untested.
2. You may run multiple client instances to test the script
### Chatroom functionality
#####compile
make
#####usage
| Command | Parameter | Desription |
| ------------- | --------------------- | ----------------------------------- |
| quit | | Leave the chatroom |
| ./client | "text from client" | send the msg to all online users ("use") |
| ./server | "text from server" | Send the msg to a particular user |
### Server
Each user is handled by a seperate thread in the server.The threads synchronise access to a global linked list
storing the user information
### Client
When the client connects to the server, it executes a chatroom shell. Each client has 2 running threads one for sending commands and other for receiving msgs, both working in sync with each other.
### TO DO and Contributions
Feel free to contribute and collaborate
1. Making a testing environment to check for subtle synchronisation bugs
2. Resolving same user-name conflicts
3. adding feature to change user name
4. BUG-: When a user is typing and at the same moment receives a msg in the chatroom
近期下载者:
相关文件:
收藏者: