docs.unity3d.com
    Show / Hide Table of Contents

    Class UDPSocketMock

    Inheritance
    Object
    UDPSocketMock
    RelayServerMock
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Networking.Transport.Tests
    Syntax
    public class UDPSocketMock : IDisposable

    Constructors

    UDPSocketMock(String, UInt16)

    Declaration
    public UDPSocketMock(string address, ushort port)
    Parameters
    Type Name Description
    String address
    UInt16 port

    Methods

    Close()

    Declaration
    public void Close()

    Dispose()

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

    ExpectPacket(Byte[], Action<EndPoint, Byte[]>, PacketParameter[], Boolean)

    Declaration
    public void ExpectPacket(byte[] packet, Action<EndPoint, byte[]> callback, PacketParameter[] parameters = null, bool optional = false)
    Parameters
    Type Name Description
    Byte[] packet
    Action<EndPoint, Byte[]> callback
    PacketParameter[] parameters
    Boolean optional

    Send(Byte[], EndPoint)

    Declaration
    public void Send(byte[] packet, EndPoint endpoint)
    Parameters
    Type Name Description
    Byte[] packet
    EndPoint endpoint

    Send(Byte[], Int32, EndPoint)

    Declaration
    public void Send(byte[] packet, int length, EndPoint endpoint)
    Parameters
    Type Name Description
    Byte[] packet
    Int32 length
    EndPoint endpoint
    Back to top
    Terms of use
    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