Hello all.
I have been successfully using the org.apache.commons.net.telnet
package with my android app, but i have run into a problem.
I have an instance of TelnetClient, which works fine, but when i call
TelnetClient.disconnect it just hangs and nothing happens at all.
A small test case...hangs when disconnect is called. Works fine on my
home machine but not on the emulator. Please help as Im not sure whats
happening here...
Thanks, (code below)
private TelnetClient telnet = new TelnetClient();
private InputStream in;
private PrintStream out;
public class Test{
public Test(){
try {
telnet.connect( ipAddress, port );
// Get input and output stream references
in = telnet.getInputStream();
out = new PrintStream( telnet.getOutputStream() );
Log.d(TAG, "test disconnect");
telnet.disconnect(); //HERE
Log.d(TAG, "test disconnected");
} catch (SocketException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en