Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 23rd, 2007, 3:22 PM   #1
^^vampire^^
Newbie
 
Join Date: Aug 2007
Posts: 2
Rep Power: 0 ^^vampire^^ is on a distinguished road
Java Socket As Client Inly Receives One Msg

Hey Guys,

I'm having a problem with my java applet. It connects to a server and then is supposed to loop throught the receive command but it only seems to receive one set of text from the server and no more. The server i'm running is programmed in vb 2005 (vb.net). Could you please tell me if this code is correct or not -

BufferedReader in;
in = new BufferedReader(new InputStreamReader(socket.getInputStream()));

try
   {
	//while the servers response isn't '<EXIT>' or the client itself calls stop
	while ((serverInput = in.readLine()) != "<EXIT>" || stop == true)
	{
		if (serverInput != null)
		{
			firstCommand = serverInput.split(":");	
                         //do stuff
		}
	}
   }
catch (Exception e)
{
}
^^vampire^^ is offline   Reply With Quote
Old Aug 23rd, 2007, 5:55 PM   #2
^^vampire^^
Newbie
 
Join Date: Aug 2007
Posts: 2
Rep Power: 0 ^^vampire^^ is on a distinguished road
Problem Solved
^^vampire^^ is offline   Reply With Quote
Old Aug 23rd, 2007, 7:46 PM   #3
andro
Professional Programmer
 
Join Date: Oct 2005
Location: California
Posts: 319
Rep Power: 4 andro is on a distinguished road
Send a message via AIM to andro
You should post the solution to your problem for others to see :p
andro is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming with Java: Tutorial ReggaetonKing Java 7 May 20th, 2008 11:58 AM
Java socket Server compile errors.. n3o_X Java 3 Nov 18th, 2007 1:39 AM
.NET Socket Class hbe02 Show Off Your Open Source Projects 1 Oct 7th, 2006 12:00 PM
Determine when client socket request has been accepted. hoffmandirt Java 8 Oct 6th, 2006 10:50 AM
Java Socket Timouts in a Chat client/server krazyshane Java 2 Feb 16th, 2006 11:49 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:24 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC