1.19 auth support (server side)

This commit is contained in:
Tnze
2022-06-19 17:46:55 +08:00
parent e405acaa02
commit 30479d6ea5
9 changed files with 251 additions and 54 deletions

View File

@ -2,6 +2,7 @@ package server
import (
"context"
"crypto/rsa"
_ "embed"
"sync"
"time"
@ -16,7 +17,7 @@ type GamePlay interface {
//
// Note: the connection will be closed after this function returned.
// You don't need to close the connection, but to keep not returning while the player is playing.
AcceptPlayer(name string, id uuid.UUID, protocol int32, conn *net.Conn)
AcceptPlayer(name string, id uuid.UUID, profilePubKey *rsa.PublicKey, protocol int32, conn *net.Conn)
}
type Game struct {