Zlatko Josic wrote:
Handler? i suppose it is listener. Something like this :
Yes, listener. Shows I didn't actually bother checking the terminology
from docs :)
future.addListener(new IoFutureListener(){
@Override
public void operationComplete(IoFuture ioFuture) {
try{
//logic here
}catch(Throwable t){
log.error("Greska ", t);
}finally{
//zatvaranje konekcije.
session.close();
}
}});
This scenario works in my test enviroment but in production, client si GPRS
terminal, there is problem.
Terminal does not accept all data. But when i remove session close(); line
it work fine.
Your explanation is not very clear. Here is what I gather you're trying
to say:
The above code is running on a server, and sending some data to a client
that connects to the Internet using GPRS. In testing environment where
the connection between the server and the client is something other than
GPRS + Internet there are no problems, but if the client is actually
connected via GPRS, it does not receive some of the data sent using the
above code.
If this is accurate, here are some more questions:
Have you checked the actual traffic between the GPRS terminal and the
server using e.g. Wireshark at the server end? Can you capture the
traffic at the client end also, when using GPRS? The traffic captures
would enable one to actually find out what's happening over the wire
(and also to see lost packets and such problems).