- Home /
Unity socket connection
I have a socket server, running on a Debian in VirtualBox. If the socket server program is running then I can connect to it without any problem. But if I close the program (server) or I don't run it at the first start of Debian the client will connect to it. I don't know what is where the client connects. (if my Debian is not running then my client in Unity cannot connect) If I arrive home I'll comment my client code. I don't have any problem with the connection in WPF or in Console, but Unity! Thanks for the help!
I little hard to understand the problem, but if you are using some built in Unity code - perhaps it creates the server if it can't find one ?
try {
_clientSocket.Connect("127.0.0.1", 25565);
Debug.Log("Server Connected");
} catch {
Debug.Log("Connection attempt... ");
}
Here is my connection code. If the server is not running (I mean i didn't start the server.exe) i still get the message: Server Connected!
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Data keeps "hanging". TCP client/server 2 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
how to find out if player hosted game 1 Answer
Multiple Cars not working 1 Answer