I'm testing my server using GNetLib for my networking on my computer. Whenever I use the IP of my network, it won't let my bind.
GNetServer netserver = new GNetServer(ServerConstants.HOST, ServerConstants.PORT);
netserver.addEventListener(new ServerEventListener() {
//random stuff not related to problem
});
netserver.bind();
My host is "76.5.43.21" // Not posting my actual IP but you get the gist. The port is 43594, and I've already tested the connection using canyouseeme.org and it says success.
Here is the full error:
java.net.BindException: Cannot assign requested address: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:106)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:382)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at org.gnet.server.GNetServer.bind(GNetServer.java:98)
at org.ott.Server.main(Server.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Is the problem that I'm using my home networks IP, or is the the library limiting the IP I can use?