network programming - GNetLib - java.net.BindException: Cannot assign requested address: JVM_Bind -
i'm testing server using gnetlib networking on computer. whenever use ip of network, won't let bind.
gnetserver netserver = new gnetserver(serverconstants.host, serverconstants.port); netserver.addeventlistener(new servereventlistener() { //random stuff not related problem }); netserver.bind();
my host "76.5.43.21" // not posting actual ip gist. port 43594, , i've tested connection using canyouseeme.org , says success.
here full error:
java.net.bindexception: cannot assign requested address: jvm_bind @ java.net.dualstackplainsocketimpl.bind0(native method) @ java.net.dualstackplainsocketimpl.socketbind(dualstackplainsocketimpl.java:106) @ java.net.abstractplainsocketimpl.bind(abstractplainsocketimpl.java:382) @ java.net.plainsocketimpl.bind(plainsocketimpl.java:190) @ java.net.serversocket.bind(serversocket.java:375) @ java.net.serversocket.<init>(serversocket.java:237) @ org.gnet.server.gnetserver.bind(gnetserver.java:98) @ org.ott.server.main(server.java:91) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ com.intellij.rt.execution.application.appmain.main(appmain.java:134)
is problem i'm using home networks ip, or the library limiting ip can use?
you can use ip address local current host. can't use ip address lives on other side of modem, router, etc. bind 0.0.0.0, inetaddress
of null
in java: you're listening @ interface, , router take care of port forwarding, if have set correctly.
Comments
Post a Comment