commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Frimston <>
Subject [net] TelnetClient dropping bytes?
Date Mon, 15 Oct 2012 15:03:32 GMT

I'm using TelnetClient to send and receive commands from a server, each 
command consisting of character data followed by a newline. However, at 
seemingly random times the response obtained from TelnetClient's 
InputStream appears to have bytes missing, or sometimes includes extra 
bytes. This does not appear to happen if I disable the "reader thread" 

I was able to reproduce the problem on Ubuntu, Windows and OSX and I am 
using commons-net version 3.1 and Oracle's 1.6 JDK.

I'm not sure if this is a bug or whether I'm just not using TelnetClient 
correctly, as I was unable to find any previous reports of similar 
problems. I've attached the simple test program I used to recreate the 
issue. The program connects to a basic socket server in a loop until the 
message echoed back is not the same as the one sent, which I've seen 
happen after anywhere between 2-400 iterations.

Can anybody confirm the problem or else point out what mistake I've made?

Many thanks,


View raw message