AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ports GPRS

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> comp.lang.java.developer
View previous topic :: View next topic  
Author Message
Mark
Guest





PostPosted: Mon Jan 05, 2004 4:44 pm    Post subject: Ports GPRS Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> comp.lang.java.developer All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.