move handshake handling and server config into handshake package

This commit is contained in:
Lucas Clemente 2016-04-15 22:24:42 +02:00
parent 30d5766598
commit 20b48c5432
6 changed files with 123 additions and 77 deletions

View file

@ -11,6 +11,7 @@ import (
"github.com/lucas-clemente/quic-go"
"github.com/lucas-clemente/quic-go/crypto"
"github.com/lucas-clemente/quic-go/handshake"
"github.com/lucas-clemente/quic-go/protocol"
"github.com/lucas-clemente/quic-go/utils"
)
@ -27,7 +28,7 @@ func main() {
panic(err)
}
serverConfig := quic.NewServerConfig(crypto.NewCurve25519KEX(), keyData)
serverConfig := handshake.NewServerConfig(crypto.NewCurve25519KEX(), keyData)
// TODO: When should a session be created?
sessions := map[protocol.ConnectionID]*quic.Session{}