Skip to content

zleihao/tcp_chat_room

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux c tcp聊天室

该聊天室是一个命令交互式的,client只需实现读取用户键盘输入,接收服务器发送的数据即可。

编译client

gcc -o client ./src/client.c

编译server

cmake -S . -B build
cd build
make

会在项目的build目录下生成一个可执行文件:chat

支持的命令

命令是以 # 开头

  1. help

    #help

  2. setname

    #setname <user_name>

  3. login

    #login <user_name> <user_pass>

  4. logout

    #logout

    image-20240728192824456

  5. changepass

    修改密码必须登录后才可以更改

    #changepass <old pass> <new pass>

  6. private

    #private <user_name> <string>

About

linux c tcp聊天室

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published