ExampleServer shows you how to construct a ready-to-use tsnet instance.
()
| 18 | |
| 19 | // ExampleServer shows you how to construct a ready-to-use tsnet instance. |
| 20 | func ExampleServer() { |
| 21 | srv := new(tsnet.Server) |
| 22 | if err := srv.Start(); err != nil { |
| 23 | log.Fatalf("can't start tsnet server: %v", err) |
| 24 | } |
| 25 | defer srv.Close() |
| 26 | } |
| 27 | |
| 28 | // ExampleServer_hostname shows you how to set a tsnet server's hostname. |
| 29 | // |