Struct UdpNetworkDriver | Unity Transport | 0.2.4-preview.0
docs.unity3d.com
    Show / Hide Table of Contents

    Struct UdpNetworkDriver

    Namespace: Unity.Networking.Transport
    Syntax
    public struct UdpNetworkDriver : INetworkDriver, IDisposable

    Constructors

    UdpNetworkDriver(INetworkParameter[])

    Declaration
    public UdpNetworkDriver(params INetworkParameter[] param)
    Parameters
    Type Name Description
    INetworkParameter[] param

    Properties

    IsCreated

    Declaration
    public bool IsCreated { get; }
    Property Value
    Type Description
    Boolean
    Implements
    INetworkDriver.IsCreated

    Listening

    Declaration
    public bool Listening { get; }
    Property Value
    Type Description
    Boolean
    Implements
    INetworkDriver.Listening

    ReceiveErrorCode

    Declaration
    public int ReceiveErrorCode { get; }
    Property Value
    Type Description
    Int32

    Methods

    Accept()

    Declaration
    public NetworkConnection Accept()
    Returns
    Type Description
    NetworkConnection
    Implements
    INetworkDriver.Accept()

    Bind(NetworkEndPoint)

    Declaration
    public int Bind(NetworkEndPoint endpoint)
    Parameters
    Type Name Description
    NetworkEndPoint endpoint
    Returns
    Type Description
    Int32
    Implements
    INetworkDriver.Bind(NetworkEndPoint)

    Connect(NetworkEndPoint)

    Declaration
    public NetworkConnection Connect(NetworkEndPoint endpoint)
    Parameters
    Type Name Description
    NetworkEndPoint endpoint
    Returns
    Type Description
    NetworkConnection
    Implements
    INetworkDriver.Connect(NetworkEndPoint)

    CreatePipeline(Type[])

    Declaration
    public NetworkPipeline CreatePipeline(params Type[] stages)
    Parameters
    Type Name Description
    Type[] stages
    Returns
    Type Description
    NetworkPipeline
    Implements
    INetworkDriver.CreatePipeline(Type[])

    Disconnect(NetworkConnection)

    Declaration
    public int Disconnect(NetworkConnection con)
    Parameters
    Type Name Description
    NetworkConnection con
    Returns
    Type Description
    Int32
    Implements
    INetworkDriver.Disconnect(NetworkConnection)

    Dispose()

    Declaration
    public void Dispose()

    GetConnectionState(NetworkConnection)

    Declaration
    public NetworkConnection.State GetConnectionState(NetworkConnection con)
    Parameters
    Type Name Description
    NetworkConnection con
    Returns
    Type Description
    NetworkConnection.State
    Implements
    INetworkDriver.GetConnectionState(NetworkConnection)

    GetPipelineBuffers(Type, NetworkConnection, ref NativeSlice<Byte>, ref NativeSlice<Byte>, ref NativeSlice<Byte>)

    Declaration
    public void GetPipelineBuffers(Type pipelineType, NetworkConnection connection, ref NativeSlice<byte> readProcessingBuffer, ref NativeSlice<byte> writeProcessingBuffer, ref NativeSlice<byte> sharedBuffer)
    Parameters
    Type Name Description
    Type pipelineType
    NetworkConnection connection
    NativeSlice<Byte> readProcessingBuffer
    NativeSlice<Byte> writeProcessingBuffer
    NativeSlice<Byte> sharedBuffer

    GetPipelineBuffers(NetworkPipeline, Int32, NetworkConnection, ref NativeSlice<Byte>, ref NativeSlice<Byte>, ref NativeSlice<Byte>)

    Declaration
    public void GetPipelineBuffers(NetworkPipeline pipeline, int stageId, NetworkConnection connection, ref NativeSlice<byte> readProcessingBuffer, ref NativeSlice<byte> writeProcessingBuffer, ref NativeSlice<byte> sharedBuffer)
    Parameters
    Type Name Description
    NetworkPipeline pipeline
    Int32 stageId
    NetworkConnection connection
    NativeSlice<Byte> readProcessingBuffer
    NativeSlice<Byte> writeProcessingBuffer
    NativeSlice<Byte> sharedBuffer

    Listen()

    Declaration
    public int Listen()
    Returns
    Type Description
    Int32
    Implements
    INetworkDriver.Listen()

    LocalEndPoint()

    Declaration
    public NetworkEndPoint LocalEndPoint()
    Returns
    Type Description
    NetworkEndPoint
    Implements
    INetworkDriver.LocalEndPoint()

    PopEvent(out NetworkConnection, out DataStreamReader)

    Declaration
    public NetworkEvent.Type PopEvent(out NetworkConnection con, out DataStreamReader bs)
    Parameters
    Type Name Description
    NetworkConnection con
    DataStreamReader bs
    Returns
    Type Description
    NetworkEvent.Type
    Implements
    INetworkDriver.PopEvent(out NetworkConnection, out DataStreamReader)

    PopEventForConnection(NetworkConnection, out DataStreamReader)

    Declaration
    public NetworkEvent.Type PopEventForConnection(NetworkConnection con, out DataStreamReader bs)
    Parameters
    Type Name Description
    NetworkConnection con
    DataStreamReader bs
    Returns
    Type Description
    NetworkEvent.Type
    Implements
    INetworkDriver.PopEventForConnection(NetworkConnection, out DataStreamReader)

    RemoteEndPoint(NetworkConnection)

    Declaration
    public NetworkEndPoint RemoteEndPoint(NetworkConnection con)
    Parameters
    Type Name Description
    NetworkConnection con
    Returns
    Type Description
    NetworkEndPoint
    Implements
    INetworkDriver.RemoteEndPoint(NetworkConnection)

    ScheduleUpdate(JobHandle)

    Declaration
    public JobHandle ScheduleUpdate(JobHandle dep = null)
    Parameters
    Type Name Description
    JobHandle dep
    Returns
    Type Description
    JobHandle
    Implements
    INetworkDriver.ScheduleUpdate(JobHandle)

    Send(NetworkPipeline, NetworkConnection, IntPtr, Int32)

    Declaration
    public int Send(NetworkPipeline pipe, NetworkConnection con, IntPtr data, int len)
    Parameters
    Type Name Description
    NetworkPipeline pipe
    NetworkConnection con
    IntPtr data
    Int32 len
    Returns
    Type Description
    Int32
    Implements
    INetworkDriver.Send(NetworkPipeline, NetworkConnection, IntPtr, Int32)

    Send(NetworkPipeline, NetworkConnection, DataStreamWriter)

    Declaration
    public int Send(NetworkPipeline pipe, NetworkConnection con, DataStreamWriter strm)
    Parameters
    Type Name Description
    NetworkPipeline pipe
    NetworkConnection con
    DataStreamWriter strm
    Returns
    Type Description
    Int32
    Implements
    INetworkDriver.Send(NetworkPipeline, NetworkConnection, DataStreamWriter)

    ToConcurrent()

    Declaration
    public UdpNetworkDriver.Concurrent ToConcurrent()
    Returns
    Type Description
    UdpNetworkDriver.Concurrent
    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