Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #577 from pdxjohnny/ssntp_examples
Browse files Browse the repository at this point in the history
Bring ssntp/examples up to date with latest API
  • Loading branch information
mcastelino authored Sep 19, 2016
2 parents 3773b26 + 5b973ba commit 4a3f5b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ssntp/examples/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func clientThread(config *ssntp.Config, n int, threads int, nFrames int, delay i
func main() {
var serverURL = flag.String("url", "localhost", "Server URL")
var cert = flag.String("cert", "/etc/pki/ciao/client.pem", "Client certificate")
var CAcert = flag.String("cacert", "/etc/pki/ciao/ciao_ca_cert.crt", "CA certificate")
var CAcert = flag.String("cacert", "/etc/pki/ciao/ca_cert.crt", "CA certificate")
var nFrames = flag.Int("frames", 10, "Number of frames to send")
var delay = flag.Int("delay", 500, "Delay(ms) between frames")
var threads = flag.Int("threads", 1, "Number of client threads")
Expand Down
6 changes: 3 additions & 3 deletions ssntp/examples/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ func (l logger) Warningf(format string, args ...interface{}) {
fmt.Printf("WARNING: Server example: "+format, args...)
}

func (server *ssntpEchoServer) ConnectNotify(uuid string, role Role) {
func (server *ssntpEchoServer) ConnectNotify(uuid string, role ssntp.Role) {
server.nConnections++
fmt.Printf("%s: %s connected (role 0x%x, current connections %d)\n", server.name, uuid, role, server.nConnections)
}

func (server *ssntpEchoServer) DisconnectNotify(uuid string, role Role) {
func (server *ssntpEchoServer) DisconnectNotify(uuid string, role ssntp.Role) {
server.nConnections--
fmt.Printf("%s: %s disconnected (role 0x%x, current connections %d)\n", server.name, uuid, role, server.nConnections)
}
Expand Down Expand Up @@ -82,7 +82,7 @@ func (server *ssntpEchoServer) ErrorNotify(uuid string, error ssntp.Error, frame

func main() {
var cert = flag.String("cert", "/etc/pki/ciao/client.pem", "Client certificate")
var CAcert = flag.String("cacert", "/etc/pki/ciao/ciao_ca_cert.crt", "CA certificate")
var CAcert = flag.String("cacert", "/etc/pki/ciao/ca_cert.crt", "CA certificate")
var cpuprofile = flag.String("cpuprofile", "", "Write cpu profile to file")
var config ssntp.Config

Expand Down

0 comments on commit 4a3f5b2

Please sign in to comment.