cwtch/app/peer/alice/alice.go

19 lines
289 B
Go
Raw Normal View History

2018-10-04 19:15:03 +00:00
package main
import (
"cwtch.im/cwtch/peer"
"log"
)
func main() {
2018-10-06 03:50:55 +00:00
alice := peer.NewCwtchPeer("alice")
2018-10-04 19:15:03 +00:00
processData := func(onion string, data []byte) []byte {
log.Printf("Recieved %s from %v", data, onion)
return data
}
alice.SetPeerDataHandler(processData)
alice.Listen()
}