pnyx/cmd/client/main.go

23 lines
376 B
Go

2024-04-03 18:52:04 -06:00
package main
import (
"fmt"
"os"
"git.metznet.ca/MetzNet/pnyx"
2024-04-03 18:52:04 -06:00
)
func main() {
client, err := pnyx.NewClient(nil)
2024-04-03 18:52:04 -06:00
if err != nil {
panic(err)
}
server_public, secret, err := client.Connect(os.Args[1])
2024-04-03 18:52:04 -06:00
if err != nil {
panic(err)
}
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
}