Connection to non-default host and port
See original GitHub issueGood day. How can i connect to another host and port?
I tried with this code below, but MLAPI anyway using defaults “localhost” and “7777” port:
using UnityEngine;
using UnityEngine.UI;
using MLAPI;
public class UIController : MonoBehaviour {
public Text host;
public Text port;
public void EventHost() {
NetworkingManager.singleton.NetworkConfig.ConnectAddress = host.text.Trim();
NetworkingManager.singleton.NetworkConfig.ConnectPort = int.Parse(port.text.Trim());
NetworkingManager.singleton.StartHost();
}
public void EventClient() {
NetworkingManager.singleton.NetworkConfig.ConnectAddress = host.text.Trim();
NetworkingManager.singleton.NetworkConfig.ConnectPort = int.Parse(port.text.Trim());
NetworkingManager.singleton.StartClient();
}
}
- Unity Version: 2018.3.1f2
- MLAPI Version (Commit # or release version): 5.0.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to connect to non-default sftp port? - Linux Concept
In the “Host” field, enter the hostname or IP address of the SFTP server, followed by a colon and the port number. For...
Read more >How to connect to default instance using Non-Standard ...
1 Answer 1 · Run the Browser Service · Create a SQL Server Alias on all your client machines, using the SQL Server...
Read more >Use nondefault ports for the portal's ArcGIS Web Adaptor
This workflow allows an instance of Web Adaptor running on nondefault ports to be configured with the portal, with a reverse proxy server...
Read more >Connect to a non-default SFTP port
We will show in this article how to connect to an explicit port number, using the sftp utility. The sftp command information: root@web...
Read more >Running SQL Server 'Default' instance on a non-default (or ...
We can connect to the instance of SQL Server by using its server name, its FQDN, or its IP address followed by a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The EventClient code should be correct. The EventHost method is however incorrect. It should be the following:
Or for better clarity:
Hope this solves your issue.
I realize this is very old but the port and ip are no longer accessible in the config. where should I set them.