Quantcast
Channel: Questions in topic: "linux"
Viewing all articles
Browse latest Browse all 504

Unity cant have multiple servers hosting at once on linux

$
0
0
So i have a master server on linux and when a player requests a lobby it starts a server host to have that player and anyone who wants to connect to him play the game. the server manager calls lobbyManager.StartHost() and the server host calls lobbyManager.StartServer(). on linux i start the server manager and everything works fine but when i start the server host while the server manager is still running it gives me this error `Unhandled exeption: System.Net.Sockets.SocketExeption: Address already in use at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x00000] in :0 at System.Net.Sockets.TcpListener.Start (Int32 backlog) [0x00000] in :0 at System.Net.Sockets.TcpListener.Start () [0x00000] in :0 at GameStartedServer.BackgroundStart () [0x00000] in :0` i dont have this problem on windows only on linux so i looked around and found [this][1] it says that its a problem with linux and a work around they found was to do `server.Server.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true)` before starting the server. but what i need help with is i need to know how to call that function in unity. Because all i do is call StartServer or StartHost i don't have access to the socket so i cant call SetSocketOption [1]: https://github.com/fable-compiler/Fable/issues/809

Viewing all articles
Browse latest Browse all 504

Latest Images

Trending Articles



Latest Images