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

make initial connection

This commit is contained in:
Zack Scholl 2019-04-30 11:32:11 -06:00
parent a35779f718
commit ce45c53b38

View file

@ -132,7 +132,11 @@ func New(ops Options) (c *Client, err error) {
return
}
log.Debugf("connection established: %+v", c.conn[0])
fmt.Println(c.conn[0].Receive())
if c.Options.IsSender {
fmt.Println(c.conn[0].Receive())
} else {
c.conn[0].Send([]byte("hello"))
}
// use default key (no encryption, until PAKE succeeds)
c.Key, err = crypt.New(nil, nil)