Connection problems from a netty client in Android -
Connection problems from a netty client in Android -
i using netty server in linux 1 netty client in android. (netty 4.0.23). works perfect of time. however, sometimes, client not able connect server.
the channelfuture received when trying connect tells me connection done not success (with cause not null) completed failure. failure received java.net.socketexception - ehostunreach error (no route host).
i quite sure problem not in server.
important:
i run server , client in same lan wifi network local ip addresses. i have tested in 2 different wifi networks. in 1 of them, reported error occurs , in other occurs quite often. connect_timeout_millis configured plenty time in both contextsi attach way connection client:
class="snippet-code-html lang-html prettyprint-override">............. final channelfuture futureconnection = bootstrap.connect(host, port); futureconnection.awaituninterruptibly(); if (futureconnection.isdone()){ if (futureconnection.iscancelled()) { // log error } else if (futureconnection.isdone() && futureconnection.issuccess()){ // } else if (futureconnection.isdone() && (futureconnection.cause() != null)) { // log error error reported } else { // log error } } ............
connection netty
Comments
Post a Comment