Files
ProjectOctopus/port_forwarding/tcp_learn/socket_learn_test.go
2024-06-14 10:37:40 +08:00

24 lines
217 B
Go
Executable File

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
}