docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct NetworkConnection

    Public representation of a connection. This is obtained by calling Accept() (on servers) or Connect(NetworkEndpoint) (on clients) and acts as a handle to the communication session with a remote peer.

    Implements
    IEquatable<NetworkConnection>
    Inherited Members
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Networking.Transport
    Assembly: solution.dll
    Syntax
    public struct NetworkConnection : IEquatable<NetworkConnection>

    Properties

    Name Description
    IsCreated

    Whether the connection was correctly obtained from a call to Accept() or Connect(NetworkEndpoint).

    Methods

    Name Description
    Close(NetworkDriver)

    Close an active connection. Strictly identical to Disconnect(NetworkDriver).

    Disconnect(NetworkDriver)

    Close an active connection. Strictly identical to Close(NetworkDriver).

    Equals(object)

    Indicates whether this instance and a specified object are equal.

    Equals(NetworkConnection)

    Indicates whether the current object is equal to another object of the same type.

    GetHashCode()

    Returns the hash code for this instance.

    GetState(NetworkDriver)

    Get the current state of a connection.

    PopEvent(NetworkDriver, out DataStreamReader)

    Pop the next available event on the connection.

    PopEvent(NetworkDriver, out DataStreamReader, out NetworkPipeline)

    Pop the next available event on the connection.

    ToFixedString()

    Return a fixed string representation of the connection. For use in contexts where ToString() can't be used (e.g. Burst-compiled code).

    ToString()

    Returns the fully qualified type name of this instance.

    Operators

    Name Description
    operator ==(NetworkConnection, NetworkConnection)
    operator !=(NetworkConnection, NetworkConnection)
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023