- Home /
Changing the custom master servers default port ?
Hey !
I've just downloaded the custom master server to host my multiplayer game with. But I don't want to use the default ports: 23466/50005 (Master Server/Facilitator). How do I change these ? Do I need to change these in Visual Studio ?
I haven't seen any documentation of this, so any answer is appreciated.
Thanks in advance !
Answer by DarKTower · Jun 20, 2014 at 12:01 AM
If you open MasterServer.h in Visual Studio, you will find this:
#pragma once
// Network packet types
enum {
// Master server messages start at 200, is reflected in the Unity message types
ID_DATABASE_ROWID = 200,
ID_MASTERSERVER_REDIRECT,
ID_MASTERSERVER_MSG
};
static const int NATINDEX = 4;
static const int IPINDEX = 9;
static const int PORTINDEX = 10;
static const int GUIDINDEX = 12;
static const char* VERSION = "2.0.1f1";
static const int DEFAULTPORT = 23466;
Change the last line there to the port you would like it to be. I am not as familiar with the Facilitator (As I just downloaded the MasterServer and looked at it myself the other day), but I assume it would be in about the same location.
As far as i know the masterserver supports a commandline argument to change the port, but not sure. It's been a while since i worked with the master server ;)
edit
Just looked at my "old" $$anonymous$$asterServer source (version 2.0.1) there is the commandline switch "-p" which allows you to specify a port when you start the masterserver.
ps: try using "-?" as parameter ;)
Ah, and then there's that ;) But you would have to do that everytime you launch the $$anonymous$$asterServer, am I right? Unless my method doesn't work at all (I have not tested it in the slightest, so I have absolutely no idea if it does or not), they both could be used to the same effect. ;)
This works correctly, thanks :). But one thing more, I still wanna change the Facilitator listen port. So if anyone knows how to change that port, please respond.
Try doing same instructions you do with masterserver: as far as I know, same switch, different software!
Your answer
Follow this Question
Related Questions
NAT Punchthrough failed 0 Answers
Network server. 1 Answer
are you sure the server can be connected to? 1 Answer
OnSerializeNetworkView Doesn't work Until Owner moves the Object! 0 Answers