miwarnec / DOTSNET

Public DOTSNET issue tracker
20 stars 0 forks source link

[Uri Support?] Change ports when connecting without knowing the transport system #32

Open shredder2500 opened 4 years ago

shredder2500 commented 4 years ago

Is your feature request related to a problem? Please describe. It is nice that for normal usage a system doesn't need to know what transport system its using to send and receive data. However if I want to use a different port at runtime the system has to know about both the network system and the transport system.

Describe the solution you'd like I would like to override the port in the networkClientSystem.connect method

Describe alternatives you've considered not sure, maybe a port component but that kinda breaks your current pattern

Additional context I am using Playfab Servers, the server can listen to a hard coded internal port but the external port will vary. The port is given to me when I get the info for the server but I currently have to get both the network system and transport system to connect.

miwarnec commented 3 years ago

Hey. So not all transports require a port, which is why there is no common one neither in DOTSNET nor in Mirror.

For now you could just assume a default transport like libuv and always use that port. Later on I might add URI support like "protocol:ip:port" as a string. Not sure yet :)