1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 05:11:06 +02:00

sender + receiver mildly working

This commit is contained in:
Zack Scholl 2018-06-29 06:23:00 -07:00
parent 22cd0afd11
commit b32d7060bf
6 changed files with 227 additions and 102 deletions

View file

@ -12,10 +12,12 @@ func main() {
flag.Parse()
c := croc.Init()
if *role == 0 {
if *role == -1 {
err = c.Relay()
} else if *role == 1 {
} else if *role == 0 {
err = c.Send("foo")
} else {
err = c.Receive()
}
if err != nil {
panic(err)