Interface INetworkTransport | Multiplayer HLAPI | 1.0.8
docs.unity3d.com
    Show / Hide Table of Contents

    Interface INetworkTransport

    Namespace: UnityEngine.Networking
    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
    Boolean

    Methods

    AddHost(HostTopology, Int32, String)

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

    AddHostWithSimulator(HostTopology, Int32, Int32, Int32)

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

    AddWebsocketHost(HostTopology, Int32, String)

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

    Connect(Int32, String, Int32, Int32, out Byte)

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

    ConnectAsNetworkHost(Int32, String, Int32, 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
    Int32 hostId
    String address
    Int32 port
    NetworkID network
    SourceID source
    NodeID node
    Byte error

    ConnectEndPoint(Int32, EndPoint, Int32, out Byte)

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

    ConnectToNetworkPeer(Int32, String, Int32, Int32, Int32, 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
    Int32 hostId
    String address
    Int32 port
    Int32 specialConnectionId
    Int32 relaySlotId
    NetworkID network
    SourceID source
    NodeID node
    Byte error
    Returns
    Type Description
    Int32

    ConnectWithSimulator(Int32, String, Int32, Int32, out Byte, ConnectionSimulatorConfig)

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

    Disconnect(Int32, Int32, out Byte)

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

    DoesEndPointUsePlatformProtocols(EndPoint)

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

    GetBroadcastConnectionInfo(Int32, out String, out Int32, out Byte)

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

    GetBroadcastConnectionMessage(Int32, Byte[], Int32, out Int32, out Byte)

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

    GetConnectionInfo(Int32, Int32, out String, out Int32, 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
    Int32 hostId
    Int32 connectionId
    String address
    Int32 port
    NetworkID network
    NodeID dstNode
    Byte error

    GetCurrentRTT(Int32, Int32, out Byte)

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

    Init()

    Declaration
    void Init()

    Init(GlobalConfig)

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

    Receive(out Int32, out Int32, out Int32, Byte[], Int32, out Int32, 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
    Int32 hostId
    Int32 connectionId
    Int32 channelId
    Byte[] buffer
    Int32 bufferSize
    Int32 receivedSize
    Byte error
    Returns
    Type Description
    NetworkEventType

    ReceiveFromHost(Int32, out Int32, out Int32, Byte[], Int32, out Int32, 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
    Int32 hostId
    Int32 connectionId
    Int32 channelId
    Byte[] buffer
    Int32 bufferSize
    Int32 receivedSize
    Byte error
    Returns
    Type Description
    NetworkEventType

    ReceiveRelayEventFromHost(Int32, out Byte)

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

    RemoveHost(Int32)

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

    Send(Int32, Int32, Int32, Byte[], Int32, out Byte)

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

    SetBroadcastCredentials(Int32, Int32, Int32, Int32, out Byte)

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

    SetPacketStat(Int32, Int32, Int32, Int32)

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

    Shutdown()

    Declaration
    void Shutdown()

    StartBroadcastDiscovery(Int32, Int32, Int32, Int32, Int32, Byte[], Int32, Int32, 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
    Int32 hostId
    Int32 broadcastPort
    Int32 key
    Int32 version
    Int32 subversion
    Byte[] buffer
    Int32 size
    Int32 timeout
    Byte error
    Returns
    Type Description
    Boolean

    StopBroadcastDiscovery()

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