docs.unity.cn
    Show / Hide Table of Contents

    Enum ConnectionState.State

    The current state of the connection.

    Namespace: Unity.NetCode
    Syntax
    public enum State

    Fields

    Name Description Value
    Unknown

    Default, connection not created or not initialized.


    0
    Disconnected

    The connection has been closed.


    1
    Connecting

    Client-Only, the connection is trying to contact the server and establish a communication channel.


    2
    Handshake

    The client connected to the server and is exchanging some initial messages, such as verify the NetworkProtocolVersion and GameProtocolVersion are compatible, and assign the network id.


    3
    Connected

    The connection has been established, the handshake is termiated and the connection is now fully connected.


    4
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023