可以把协议栈读到的数据发给用户层应用了! 下一步把用户层应用的数据写给客户端

This commit is contained in:
impact-eintr
2022-12-08 18:39:11 +08:00
parent c025408041
commit 9a46ec9db5
8 changed files with 363 additions and 29 deletions

View File

@@ -17,7 +17,9 @@ func main() {
log.Println("连接建立")
conn.Write([]byte("helloworld"))
log.Println("发送了数据")
conn.Close()
buf := make([]byte, 1024)
conn.Read(buf)
//conn.Close()
}()
t := time.NewTimer(1000 * time.Millisecond)