cwtch/app/peer/alice/alice.go

19 lines
309 B
Go
Raw Normal View History

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