Alright, so I don’t really understand what is going on, before anyone goes to point out that it has to do with “Port Forwarding” or a “Firewall exception”, I’d like to state that you’re wrong. I don’t have any type of fire-wall running and my ports are forwarded correctly.
I recently picked up the SmartFox Server, and started to mess around with it, however once I wanted to test it over the internet, everything started falling apart, when they tried to connect to me via my IPv4 address, they could not…
Now, I had to think back a bit, but I did figure out it wasn’t a port problem, I tested port 9933 and it was working fine, however I changed the SmartFox Server to listen for TCP/UDP on port 5555, which also didn’t do anything for me, so, I went ahead and wrote a very, VERY basic BARE-BONES back end, to see what was going on
(This is a java back-end, basic server)
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class Main implements Runnable {
ServerSocket _serverSocket;
Socket _socket;
public Main() {
try {
System.out.println("Starting Server");
_serverSocket = new ServerSocket(5555);
} catch (IOException e) {
System.out.println("Startup Failed");
e.printStackTrace();
}
}
public void run() {
while(true) {
try {
_socket = _serverSocket.accept();
String connectingHost = _socket.getInetAddress().getHostName();
System.out.println("Connection from " + connectingHost);
} catch (IOException e) {
e.printStackTrace();
}
}
}
public static void main(String args[]) {
new Thread(new Main()).start();
}
}
Alright, so I’m running this server, now I try to connect locally using my Unity3D application and I receive the following message from the server:
Great, so I have connected locally, so I attempted to connect using my Ip address, 50...110
Alright, so it’s obviously connecting and I’m not getting any connection errors on the unity side, so does anyone know what’s going on? I’ve spent the last 2-3 hours learning how to use Smart-Fox server, and although I don’t have a detailed understanding of it yet, I’m proud of what I’ve accomplished on a “localhost” scale and would like to branch it outwards.