command
Version:
v0.0.0-...-f10d331
Opens a new window with list of versions in this module.
Published: Dec 8, 2023
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
简单实验1
照着conn_test文件写一个demo来运行起来
NOTICE
客户端连接生成
客户端连接生成的时候就会自动发送DH64加密的信息给服务器。
io.Copy
var wg sync.WaitGroup
wg.Add(1)
go func() {
conn, err := listener.Accept()
if err != nil {
log.Fatalf("accept failed: %s", err.Error())
return
}
io.Copy(conn, conn)
conn.Close()
log.Println("copy exit")
wg.Done()
}()
这里的io.Copy
要注意一下
运行截图
参考资料
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.