IM_golang_demo

*GOLANG_即时通讯学习demo*

这是一个初学者学习golang,一直迭代的一个小demo,

==主要练习对goroutine和channel的理解==

祝早日学成归来哦

大概运行流程如下(因版本而异):

运行:

服务器端口:

go run main.go server.go user.go

  • windows:

    ​ 建立连接:

    ​ telnet 127.0.0.1 9999

    ​ 发生消息:

    ​ 先ctrl键 + ]键

    ​ 再输入:send xxx(消息内容)

  • linux:

    ​ nc 127.0.0.1

  • macOS:

    ​ 略,,,本人没macOS

学习资料来自B站UP主https://www.bilibili.com/video/BV1gf4y1r79E