MCPcopy Create free account
hub / github.com/code-scan/Goal / ClientWait

Function ClientWait

Gproxy/server.go:14–32  ·  view source on GitHub ↗
(port string)

Source from the content-addressed store, hash-verified

12var session *yamux.Session
13
14func ClientWait(port string) {
15 hostClient := "0.0.0.0"
16 portClient := port
17 client, err := net.Listen("tcp", fmt.Sprintf("%s:%s", hostClient, portClient))
18 if err != nil {
19 fmt.Println(err, err.Error())
20 os.Exit(0)
21 }
22 fmt.Println("client list on :7777")
23 for {
24 conn, err := client.Accept()
25 if err != nil {
26 fmt.Println("clien error")
27 fmt.Println(err)
28 continue
29 }
30 session, err = yamux.Server(conn, nil)
31 }
32}
33func ServerWait(port string) {
34 hostServer := "0.0.0.0"
35 portServer := port

Callers 1

TestProxyFunction · 0.92

Calls 1

ErrorMethod · 0.80

Tested by 1

TestProxyFunction · 0.74