docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct NetworkInterfaceUnmanagedWrapper<T>

    An unmanaged network interface that can act as a wrapper for a managed one. Use WrapToUnmanaged<T>(T) to obtain an instance. Do not create one manually.

    Implements
    INetworkInterface
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Networking.Transport
    Assembly: solution.dll
    Syntax
    public struct NetworkInterfaceUnmanagedWrapper<T> : INetworkInterface, IDisposable where T : INetworkInterface
    Type Parameters
    Name Description
    T

    Properties

    Name Description
    LocalEndpoint

    Gets the local endpoint that the interface will use to communicate on the network. This call only makes sense after Bind(NetworkEndpoint) has already been called, and represents the endpoint the interface is actually bound to. This property serves the same purpose as getsockname in the BSD socket world.

    Methods

    Name Description
    Bind(NetworkEndpoint)

    Binds the network interface to an endpoint. This is meant to act the same way as the bind call in the BSD socket world. One way to see it is that it "attaches" the network interface to a specific local address on the machine.

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Initialize(ref NetworkSettings, ref int)

    Initialize the network interface with the given settings.

    Listen()

    Start listening for incoming connections. Unlike Bind(NetworkEndpoint) which will always be called on clients and servers, this is only meant to be called on servers.

    ScheduleReceive(ref ReceiveJobArguments, JobHandle)

    Schedule a receive job. This job's responsibility is to read data from the network and enqueue it in ReceiveQueue.

    ScheduleSend(ref SendJobArguments, JobHandle)

    Schedule a send job. This job's responsibility is to flush any data stored in SendQueue to the network.

    Extension Methods

    ManagedNetworkInterfaceExtensions.WrapToUnmanaged<T>(T)
    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