 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Mark Guest
|
Posted: Mon Jan 05, 2004 4:44 pm Post subject: Ports GPRS |
|
|
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(socket.getOutputStream(), true);
BufferedReader in = new BufferedReader(new
InputStreamReader(socket.getInputStream()));
String inputLine, outputLine;
KnockKnockProtocol kkp = new KnockKnockProtocol();
outputLine = kkp.processInput(null);
out.println(outputLine);
while ((inputLine = in.readLine()) != null)
{
outputLine = kkp.processInput(inputLine);
out.println(outputLine);
if (outputLine.equals("Bye")) break;
}
out.close();
in.close();
socket.close();
}
catch (IOException e)
{
e.printStackTrace();
}
}
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|