tcp_chat
所属分类:聊天室
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2021-08-25 09:28:54
上 传 者:
sh-1993
说明: 转到聊天室服务器进行TCP通信
(Go chatroom server for TCP communication)
文件列表:
go.mod (144, 2021-08-25)
go.sum (414, 2021-08-25)
main.go (193, 2021-08-25)
server/ (0, 2021-08-25)
server/clients.go (2924, 2021-08-25)
server/core.go (1874, 2021-08-25)
server/handle_commands.go (1985, 2021-08-25)
server/rooms.go (1217, 2021-08-25)
# tcp_chat
Chatroom server designed to allow room creation/switching for connected users.
### Usage
If no port number is provided, server will default to using 9999.
Build server and run binary on linux:
```
go build -o tcp_chat main.go
./tcp_chat
```
Connect to server using netcat/telnet:
```
netcat
netcat localhost 9999
```
New users will be defaulted to room 'main', and can create new rooms at will:
```
/create myNewRoom
Room 'myNewRoom' has been created - you can now enter using: /join myNewRoom
/join myNewRoom
You have been added to room myNewRoom
```
### Administration
Users connected by localhost(127.0.0.1) IP can request admin privileges with `/admin`, allowing them to manage the server, remove other users etc.
近期下载者:
相关文件:
收藏者: