I have a question about the low level NetworkTransport interface.
I can get the server and a client to send messages to each other, but when I try to run two instances of the client the second one fails to connect, because the port is already in use by the first one.
It doesn’t throw an exception, it just logs an error message in the console saying that the port is open and I don’t know how to go about catching this error. I need a way to check if the port is already open before trying to connect to it
I could manually connect the second client to another port, but I would like to have that done automatically in case the player has that particular port open. Is that a reasonable thing to do or should I just throw them an error message?
In any case I need to know how to check if NetworkTransport.AddHost will fail and do something about it