2024-04-03 18:52:04 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-04-06 16:38:14 -06:00
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"git.metznet.ca/MetzNet/pnyx"
|
2024-04-03 18:52:04 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2024-04-06 16:38:14 -06:00
|
|
|
client, err := pnyx.NewClient(nil)
|
2024-04-03 18:52:04 -06:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
2024-04-06 16:38:14 -06:00
|
|
|
|
|
|
|
server_public, secret, err := client.Connect(os.Args[1])
|
2024-04-03 18:52:04 -06:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
2024-04-06 16:38:14 -06:00
|
|
|
fmt.Printf("Started session %s with %s", pnyx.ID[pnyx.SessionID](secret), pnyx.ID[pnyx.ClientID](server_public))
|
2024-04-03 18:52:04 -06:00
|
|
|
}
|