docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface INetworkInterface

    Interface for implementing a low-level networking interface see BaselibNetworkInterface as an example

    Inherited Members
    IDisposable.Dispose()
    Namespace: Unity.Networking.Transport
    Assembly: Unity.Networking.Transport.dll
    Syntax
    public interface INetworkInterface : IDisposable

    Properties

    LocalEndPoint

    Gets the value of the local end point

    Declaration
    NetworkInterfaceEndPoint LocalEndPoint { get; }
    Property Value
    Type Description
    NetworkInterfaceEndPoint
    See Also
    IDisposable

    Methods

    Bind(NetworkInterfaceEndPoint)

    Binds the medium to a specific endpoint.

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

    A valid NetworkInterfaceEndPoint.

    Returns
    Type Description
    int

    0 on Success

    See Also
    IDisposable

    CreateInterfaceEndPoint(NetworkEndPoint, out NetworkInterfaceEndPoint)

    Creates the interface end point using the specified address

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

    The address

    NetworkInterfaceEndPoint endpoint

    The endpoint

    Returns
    Type Description
    int

    The int

    See Also
    IDisposable

    CreateSendInterface()

    Creates the send interface

    Declaration
    NetworkSendInterface CreateSendInterface()
    Returns
    Type Description
    NetworkSendInterface

    The network send interface

    See Also
    IDisposable

    GetGenericEndPoint(NetworkInterfaceEndPoint)

    Gets the generic end point using the specified endpoint

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

    The endpoint

    Returns
    Type Description
    NetworkEndPoint

    The network end point

    See Also
    IDisposable

    Initialize(NetworkSettings)

    Initializes the interfacing passing in optional INetworkParameter

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

    NetworkSettings with which to configure the interface.

    Returns
    Type Description
    int

    0 if initialization was successful, negative value otherwise.

    See Also
    IDisposable

    Listen()

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

    Declaration
    int Listen()
    Returns
    Type Description
    int

    0 on Success

    See Also
    IDisposable

    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
    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.

    See Also
    IDisposable

    ScheduleSend(NativeQueue<QueuedSendMessage>, JobHandle)

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

    Declaration
    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.

    See Also
    IDisposable

    See Also

    IDisposable
    In This Article
    Back to top
    Copyright © 2025 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)