[ Cmii ] [ Octopus ] - add tcp portforwarding part

This commit is contained in:
zeaslity
2024-02-28 14:05:16 +08:00
parent 9447801212
commit 9d5ca4b50f
25 changed files with 1619 additions and 213 deletions

View File

@@ -0,0 +1,23 @@
package tcp_learn
import (
"testing"
"time"
)
func TestTcpServer(t *testing.T) {
var exit chan bool
go func() {
TcpServer()
}()
go func() {
time.Sleep(time.Second)
exit = TcpClient()
}()
<-exit
}