docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct NetworkConnection

    Public representation of a connection. Holds all information needed by the NetworkDriver to link it to an internal virtual connection.

    Implements
    IEquatable<NetworkConnection>
    Inherited Members
    ValueType.ToString()
    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
    InternalId

    Gets the value of the connection's internal ID.

    IsCreated

    Checks to see if a connection is created.

    Methods

    Name Description
    Close(NetworkDriver)

    Disconnects a connection and marks it for deletion. The connection will be removed on the next frame. Same as Disconnect<T>.

    Disconnect(NetworkDriver)

    Disconnects a connection and marks it for deletion. The connection will be removed on the next frame. Same as Close<T>.

    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)

    Gets the state of the connection.

    PopEvent(NetworkDriver, out DataStreamReader)

    Receive an event for this specific connection. Should be called until it returns Empty, even if the connection is disconnected.

    PopEvent(NetworkDriver, out DataStreamReader, out NetworkPipeline)

    Operators

    Name Description
    operator ==(NetworkConnection, NetworkConnection)
    operator !=(NetworkConnection, NetworkConnection)
    In This Article
    Back to top
    Copyright © 2023 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)