docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NetworkConnectionManager

    The NGO connection manager handles:

    • Client Connections
    • Client Approval
    • Processing NetworkEvents.
    • Client Disconnection
    Inheritance
    object
    NetworkConnectionManager
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Unity.Netcode
    Assembly: solution.dll
    Syntax
    public sealed class NetworkConnectionManager

    Properties

    Name Description
    DisconnectReason

    When disconnected from the server, the server may send a reason. If a reason was sent, this property will tell client code what the reason was. It should be queried after the OnClientDisconnectCallback is called

    IsListening

    Is true when a server or host is listening for connections. Is true when a client is connecting or connected to a network session. Is false when not listening, connecting, or connected.

    Events

    Name Description
    OnClientConnectedCallback

    The callback to invoke once a client connects. This callback is only ran on the server and on the local client that connects.

    OnClientDisconnectCallback

    The callback to invoke when a client disconnects. This callback is only ran on the server and on the local client that disconnects.

    OnTransportFailure

    The callback to invoke if the NetworkTransport fails.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)