Hi group'rs!
Hi downloaded the KKMultiServer-example from Sun for a multi-user
echo-server.
The good thing is, I managed to flip out the protocol and got the
server working.
The bad thing is dat my GPRS-client gets a **NO CARRIER** after each
reply. So it seems the server closes the connection.
W h y ????
Any help is appreciated much!
Here's some code from the example thread-class:
public void run()
{
try
{
PrintWriter out = new PrintWriter(soc ket.getOutputSt ream(), true);
BufferedReader in = new BufferedReader( new
InputStreamRead er(socket.getIn putStream()));
String inputLine, outputLine;
KnockKnockProto col kkp = new KnockKnockProto col();
outputLine = kkp.processInpu t(null);
out.println(out putLine);
while ((inputLine = in.readLine()) != null)
{
outputLine = kkp.processInpu t(inputLine);
out.println(out putLine);
if (outputLine.equ als("Bye")) break;
}
out.close();
in.close();
socket.close();
}
catch (IOException e)
{
e.printStackTra ce();
}
}
Hi downloaded the KKMultiServer-example from Sun for a multi-user
echo-server.
The good thing is, I managed to flip out the protocol and got the
server working.
The bad thing is dat my GPRS-client gets a **NO CARRIER** after each
reply. So it seems the server closes the connection.
W h y ????
Any help is appreciated much!
Here's some code from the example thread-class:
public void run()
{
try
{
PrintWriter out = new PrintWriter(soc ket.getOutputSt ream(), true);
BufferedReader in = new BufferedReader( new
InputStreamRead er(socket.getIn putStream()));
String inputLine, outputLine;
KnockKnockProto col kkp = new KnockKnockProto col();
outputLine = kkp.processInpu t(null);
out.println(out putLine);
while ((inputLine = in.readLine()) != null)
{
outputLine = kkp.processInpu t(inputLine);
out.println(out putLine);
if (outputLine.equ als("Bye")) break;
}
out.close();
in.close();
socket.close();
}
catch (IOException e)
{
e.printStackTra ce();
}
}