Mirror::Authenticators::TimeoutAuthenticator
An authenticator that disconnects connections if they don't authenticate within a specified time limit.
Inherits from NetworkAuthenticator, MonoBehaviour
Public Functions
Name | |
---|---|
void | Awake() |
virtual override void | OnStartClient() Called on client from StartClient to initialize the Authenticator |
virtual override void | OnStartServer() Called on server from StartServer to initialize the Authenticator |
virtual override void | OnClientAuthenticate(NetworkConnection conn) Called on client from OnClientAuthenticateInternal when a client needs to authenticate |
virtual override void | OnServerAuthenticate(NetworkConnection conn) Called on server from OnServerAuthenticateInternal when a client needs to authenticate |
Public Attributes
Name | |
---|---|
NetworkAuthenticator | authenticator |
float | timeout |
Additional inherited members
Protected Functions inherited from NetworkAuthenticator
Name | |
---|---|
void | ServerAccept(NetworkConnection conn) |
void | ServerReject(NetworkConnection conn) |
void | ClientAccept(NetworkConnection conn) |
void | ClientReject(NetworkConnection conn) |
Public Attributes inherited from NetworkAuthenticator
Name | |
---|---|
UnityEventNetworkConnection | OnServerAuthenticated Notify subscribers on the server when a client is authenticated |
UnityEventNetworkConnection | OnClientAuthenticated Notify subscribers on the client when the client is authenticated |
Public Functions Documentation
function Awake
inline void Awake()
function OnStartClient
inline virtual override void OnStartClient()
Called on client from StartClient to initialize the Authenticator
Reimplements: Mirror::NetworkAuthenticator::OnStartClient
Client message handlers should be registered in this method.
function OnStartServer
inline virtual override void OnStartServer()
Called on server from StartServer to initialize the Authenticator
Reimplements: Mirror::NetworkAuthenticator::OnStartServer
Server message handlers should be registered in this method.
function OnClientAuthenticate
inline virtual override void OnClientAuthenticate(
NetworkConnection conn
)
Called on client from OnClientAuthenticateInternal when a client needs to authenticate
Parameters:
- conn Connection of the client.
Reimplements: Mirror::NetworkAuthenticator::OnClientAuthenticate
function OnServerAuthenticate
inline virtual override void OnServerAuthenticate(
NetworkConnection conn
)
Called on server from OnServerAuthenticateInternal when a client needs to authenticate
Parameters:
- conn Connection to client.
Reimplements: Mirror::NetworkAuthenticator::OnServerAuthenticate
Public Attributes Documentation
variable authenticator
NetworkAuthenticator authenticator;
variable timeout
float timeout = 60;
Updated on 18 January 2021 at 09:53:55 UTC