docs.unity3d.com
    Show / Hide Table of Contents

    Struct IPCNetworkInterface

    The ipc network interface

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Networking.Transport
    Syntax
    [BurstCompile]
    public struct IPCNetworkInterface : INetworkInterface, IDisposable

    Properties

    LocalEndPoint

    Gets the value of the local end point

    Declaration
    public readonly NetworkInterfaceEndPoint LocalEndPoint { get; }
    Property Value
    Type Description
    NetworkInterfaceEndPoint
    Implements
    INetworkInterface.LocalEndPoint

    Methods

    Bind(NetworkInterfaceEndPoint)

    Binds the medium to a specific endpoint.

    Declaration
    public int Bind(NetworkInterfaceEndPoint endpoint)
    Parameters
    Type Name Description
    NetworkInterfaceEndPoint endpoint

    A valid NetworkInterfaceEndPoint.

    Returns
    Type Description
    Int32

    0 on Success

    Implements
    INetworkInterface.Bind(NetworkInterfaceEndPoint)

    CreateInterfaceEndPoint(NetworkEndPoint, out NetworkInterfaceEndPoint)

    Creates an interface end point. Only available for loopback addresses.

    Declaration
    public int CreateInterfaceEndPoint(NetworkEndPoint address, out NetworkInterfaceEndPoint endpoint)
    Parameters
    Type Name Description
    NetworkEndPoint address

    Loopback address

    NetworkInterfaceEndPoint endpoint

    The endpoint

    Returns
    Type Description
    Int32

    The status code of the result, 0 being a success.

    Implements
    INetworkInterface.CreateInterfaceEndPoint(NetworkEndPoint, out NetworkInterfaceEndPoint)

    CreateSendInterface()

    Creates the send interface

    Declaration
    public NetworkSendInterface CreateSendInterface()
    Returns
    Type Description
    NetworkSendInterface

    The network send interface

    Implements
    INetworkInterface.CreateSendInterface()

    Dispose()

    Cleans up both the local end point and the IPCManager instance.

    Declaration
    public void Dispose()
    Implements
    IDisposable.Dispose()

    GetGenericEndPoint(NetworkInterfaceEndPoint)

    Retrieves an already created endpoint with port or creates one.

    Declaration
    public NetworkEndPoint GetGenericEndPoint(NetworkInterfaceEndPoint endpoint)
    Parameters
    Type Name Description
    NetworkInterfaceEndPoint endpoint

    The loopback endpoint

    Returns
    Type Description
    NetworkEndPoint

    NetworkEndPoint

    Implements
    INetworkInterface.GetGenericEndPoint(NetworkInterfaceEndPoint)

    Initialize(NetworkSettings)

    Initializes the interface passing in optional INetworkParameter

    Declaration
    public int Initialize(NetworkSettings settings)
    Parameters
    Type Name Description
    NetworkSettings settings

    NetworkSettings with which to configure the interface.

    Returns
    Type Description
    Int32

    Returns 0 on success.

    Implements
    INetworkInterface.Initialize(NetworkSettings)

    Listen()

    Start listening for incoming connections. This is normally a no-op for real UDP sockets.

    Declaration
    public int Listen()
    Returns
    Type Description
    Int32

    0 on Success

    Implements
    INetworkInterface.Listen()

    ScheduleReceive(NetworkPacketReceiver, JobHandle)

    Schedule a ReceiveJob. This is used to read data from your supported medium and pass it to the AppendData function supplied by NetworkDriver

    Declaration
    public JobHandle ScheduleReceive(NetworkPacketReceiver receiver, JobHandle dep)
    Parameters
    Type Name Description
    NetworkPacketReceiver receiver

    A NetworkDriver used to parse the data received.

    JobHandle dep

    A JobHandle to any dependency we might have.

    Returns
    Type Description
    JobHandle

    A JobHandle to our newly created ScheduleReceive Job.

    Implements
    INetworkInterface.ScheduleReceive(NetworkPacketReceiver, JobHandle)

    ScheduleSend(NativeQueue<QueuedSendMessage>, JobHandle)

    Schedule a SendJob. This is used to flush send queues to your supported medium

    Declaration
    public JobHandle ScheduleSend(NativeQueue<QueuedSendMessage> sendQueue, JobHandle dep)
    Parameters
    Type Name Description
    NativeQueue<QueuedSendMessage> sendQueue

    The send queue which can be used to emulate parallel send.

    JobHandle dep

    A JobHandle to any dependency we might have.

    Returns
    Type Description
    JobHandle

    A JobHandle to our newly created ScheduleSend Job.

    Implements
    INetworkInterface.ScheduleSend(NativeQueue<QueuedSendMessage>, JobHandle)
    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