摘要: package main import ( "fmt" "net" "strings" "time" ) type Client struct { C chan string //用于发送数据的管道 Name string //用户名 Address string //IP地址 } //保存在线用户 var onLineMap map[s... 阅读全文
posted @ 2019-01-03 21:56 不骄不傲 阅读(497) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "io/ioutil" "strings" ) func main() { r1 := strings.NewReader("aaa") //返回ReadCloser对象提供close函数 rc1 := ioutil.NopCloser(r1) defer rc1.Close() //ReadAll读取所有数据 p,... 阅读全文
posted @ 2019-01-03 11:24 不骄不傲 阅读(3159) 评论(0) 推荐(0) 编辑