UnityEngine.Networking.NetworkServer.ListenRelay C# (CSharp) Method

ListenRelay() public static method

Starts a server using a Relay server. This is the manual way of using the Relay server, as the regular NetworkServer.Connect() will automatically use the Relay server if a match exists.

public static ListenRelay ( string relayIp, int relayPort, NetworkID netGuid, SourceID sourceId, NodeID nodeId ) : void
relayIp string Relay server IP Address.
relayPort int Relay server port.
netGuid NetworkID GUID of the network to create.
sourceId SourceID This server's sourceId.
nodeId NodeID The node to join the network with.
return void
        public static void ListenRelay(string relayIp, int relayPort, NetworkID netGuid, SourceID sourceId, NodeID nodeId)
        {
            instance.InternalListenRelay(relayIp, relayPort, netGuid, sourceId, nodeId);
        }