docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface INetworkTransport

    Namespace: UnityEngine.Networking
    Assembly: com.unity.multiplayer-hlapi.Runtime.dll
    Syntax
    [Obsolete("The high level API classes are deprecated and will be removed in the future.")]
    public interface INetworkTransport

    Properties

    IsStarted

    Declaration
    bool IsStarted { get; }
    Property Value
    Type Description
    bool

    Methods

    AddHost(HostTopology, int, string)

    Declaration
    int AddHost(HostTopology topology, int port, string ip)
    Parameters
    Type Name Description
    HostTopology topology
    int port
    string ip
    Returns
    Type Description
    int

    AddHostWithSimulator(HostTopology, int, int, int)

    Declaration
    int AddHostWithSimulator(HostTopology topology, int minTimeout, int maxTimeout, int port)
    Parameters
    Type Name Description
    HostTopology topology
    int minTimeout
    int maxTimeout
    int port
    Returns
    Type Description
    int

    AddWebsocketHost(HostTopology, int, string)

    Declaration
    int AddWebsocketHost(HostTopology topology, int port, string ip)
    Parameters
    Type Name Description
    HostTopology topology
    int port
    string ip
    Returns
    Type Description
    int

    Connect(int, string, int, int, out byte)

    Declaration
    int Connect(int hostId, string address, int port, int specialConnectionId, out byte error)
    Parameters
    Type Name Description
    int hostId
    string address
    int port
    int specialConnectionId
    byte error
    Returns
    Type Description
    int

    ConnectAsNetworkHost(int, string, int, NetworkID, SourceID, NodeID, out byte)

    Declaration
    void ConnectAsNetworkHost(int hostId, string address, int port, NetworkID network, SourceID source, NodeID node, out byte error)
    Parameters
    Type Name Description
    int hostId
    string address
    int port
    NetworkID network
    SourceID source
    NodeID node
    byte error

    ConnectEndPoint(int, EndPoint, int, out byte)

    Declaration
    int ConnectEndPoint(int hostId, EndPoint endPoint, int specialConnectionId, out byte error)
    Parameters
    Type Name Description
    int hostId
    EndPoint endPoint
    int specialConnectionId
    byte error
    Returns
    Type Description
    int

    ConnectToNetworkPeer(int, string, int, int, int, NetworkID, SourceID, NodeID, out byte)

    Declaration
    int ConnectToNetworkPeer(int hostId, string address, int port, int specialConnectionId, int relaySlotId, NetworkID network, SourceID source, NodeID node, out byte error)
    Parameters
    Type Name Description
    int hostId
    string address
    int port
    int specialConnectionId
    int relaySlotId
    NetworkID network
    SourceID source
    NodeID node
    byte error
    Returns
    Type Description
    int

    ConnectWithSimulator(int, string, int, int, out byte, ConnectionSimulatorConfig)

    Declaration
    int ConnectWithSimulator(int hostId, string address, int port, int specialConnectionId, out byte error, ConnectionSimulatorConfig conf)
    Parameters
    Type Name Description
    int hostId
    string address
    int port
    int specialConnectionId
    byte error
    ConnectionSimulatorConfig conf
    Returns
    Type Description
    int

    Disconnect(int, int, out byte)

    Declaration
    bool Disconnect(int hostId, int connectionId, out byte error)
    Parameters
    Type Name Description
    int hostId
    int connectionId
    byte error
    Returns
    Type Description
    bool

    DoesEndPointUsePlatformProtocols(EndPoint)

    Declaration
    bool DoesEndPointUsePlatformProtocols(EndPoint endPoint)
    Parameters
    Type Name Description
    EndPoint endPoint
    Returns
    Type Description
    bool

    GetBroadcastConnectionInfo(int, out string, out int, out byte)

    Declaration
    void GetBroadcastConnectionInfo(int hostId, out string address, out int port, out byte error)
    Parameters
    Type Name Description
    int hostId
    string address
    int port
    byte error

    GetBroadcastConnectionMessage(int, byte[], int, out int, out byte)

    Declaration
    void GetBroadcastConnectionMessage(int hostId, byte[] buffer, int bufferSize, out int receivedSize, out byte error)
    Parameters
    Type Name Description
    int hostId
    byte[] buffer
    int bufferSize
    int receivedSize
    byte error

    GetConnectionInfo(int, int, out string, out int, out NetworkID, out NodeID, out byte)

    Declaration
    void GetConnectionInfo(int hostId, int connectionId, out string address, out int port, out NetworkID network, out NodeID dstNode, out byte error)
    Parameters
    Type Name Description
    int hostId
    int connectionId
    string address
    int port
    NetworkID network
    NodeID dstNode
    byte error

    GetCurrentRTT(int, int, out byte)

    Declaration
    int GetCurrentRTT(int hostId, int connectionId, out byte error)
    Parameters
    Type Name Description
    int hostId
    int connectionId
    byte error
    Returns
    Type Description
    int

    Init()

    Declaration
    void Init()

    Init(GlobalConfig)

    Declaration
    void Init(GlobalConfig config)
    Parameters
    Type Name Description
    GlobalConfig config

    Receive(out int, out int, out int, byte[], int, out int, out byte)

    Declaration
    NetworkEventType Receive(out int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error)
    Parameters
    Type Name Description
    int hostId
    int connectionId
    int channelId
    byte[] buffer
    int bufferSize
    int receivedSize
    byte error
    Returns
    Type Description
    NetworkEventType

    ReceiveFromHost(int, out int, out int, byte[], int, out int, out byte)

    Declaration
    NetworkEventType ReceiveFromHost(int hostId, out int connectionId, out int channelId, byte[] buffer, int bufferSize, out int receivedSize, out byte error)
    Parameters
    Type Name Description
    int hostId
    int connectionId
    int channelId
    byte[] buffer
    int bufferSize
    int receivedSize
    byte error
    Returns
    Type Description
    NetworkEventType

    ReceiveRelayEventFromHost(int, out byte)

    Declaration
    NetworkEventType ReceiveRelayEventFromHost(int hostId, out byte error)
    Parameters
    Type Name Description
    int hostId
    byte error
    Returns
    Type Description
    NetworkEventType

    RemoveHost(int)

    Declaration
    bool RemoveHost(int hostId)
    Parameters
    Type Name Description
    int hostId
    Returns
    Type Description
    bool

    Send(int, int, int, byte[], int, out byte)

    Declaration
    bool Send(int hostId, int connectionId, int channelId, byte[] buffer, int size, out byte error)
    Parameters
    Type Name Description
    int hostId
    int connectionId
    int channelId
    byte[] buffer
    int size
    byte error
    Returns
    Type Description
    bool

    SetBroadcastCredentials(int, int, int, int, out byte)

    Declaration
    void SetBroadcastCredentials(int hostId, int key, int version, int subversion, out byte error)
    Parameters
    Type Name Description
    int hostId
    int key
    int version
    int subversion
    byte error

    SetPacketStat(int, int, int, int)

    Declaration
    void SetPacketStat(int direction, int packetStatId, int numMsgs, int numBytes)
    Parameters
    Type Name Description
    int direction
    int packetStatId
    int numMsgs
    int numBytes

    Shutdown()

    Declaration
    void Shutdown()

    StartBroadcastDiscovery(int, int, int, int, int, byte[], int, int, out byte)

    Declaration
    bool StartBroadcastDiscovery(int hostId, int broadcastPort, int key, int version, int subversion, byte[] buffer, int size, int timeout, out byte error)
    Parameters
    Type Name Description
    int hostId
    int broadcastPort
    int key
    int version
    int subversion
    byte[] buffer
    int size
    int timeout
    byte error
    Returns
    Type Description
    bool

    StopBroadcastDiscovery()

    Declaration
    void StopBroadcastDiscovery()
    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)