Check for token in every received message.

This commit is contained in:
Milos Gajdos
2019-08-14 01:23:03 +01:00
parent 750267b308
commit e607485c6b
2 changed files with 55 additions and 9 deletions

View File

@@ -98,3 +98,35 @@ func TestTunnel(t *testing.T) {
// wait until done
wg.Wait()
}
//func TestLoopbackTunnel(t *testing.T) {
// // create a new tunnel client
// tun := NewTunnel(
// Address("127.0.0.1:9096"),
// Nodes("127.0.0.1:9096"),
// )
//
// // start tunB
// err := tun.Connect()
// if err != nil {
// t.Fatal(err)
// }
// defer tun.Close()
//
// time.Sleep(time.Millisecond * 50)
//
// var wg sync.WaitGroup
//
// // start accepting connections
// // on tunnel A
// wg.Add(1)
// go testAccept(t, tun, &wg)
//
// time.Sleep(time.Millisecond * 50)
//
// // dial and send via B
// testSend(t, tun)
//
// // wait until done
// wg.Wait()
//}