()
| 100 | } |
| 101 | |
| 102 | func main() { |
| 103 | |
| 104 | client := znet.NewClient("127.0.0.1", 8999) |
| 105 | |
| 106 | client.SetOnConnStart(DoClientConnectedBegin) |
| 107 | |
| 108 | client.Start() |
| 109 | |
| 110 | // close |
| 111 | c := make(chan os.Signal, 1) |
| 112 | signal.Notify(c, os.Interrupt, os.Kill) |
| 113 | sig := <-c |
| 114 | fmt.Println("===exit===", sig) |
| 115 | |
| 116 | } |
nothing calls this directly
no test coverage detected