![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Aug 2007
Posts: 2
Rep Power: 0
![]() |
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)
{
} |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Aug 2007
Posts: 2
Rep Power: 0
![]() |
Problem Solved
![]() |
|
|
|
|
|
#3 |
|
Professional Programmer
|
You should post the solution to your problem for others to see :p
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming with Java: Tutorial | ReggaetonKing | Java | 7 | May 20th, 2008 10:58 AM |
| Java socket Server compile errors.. | n3o_X | Java | 3 | Nov 18th, 2007 12:39 AM |
| .NET Socket Class | hbe02 | Show Off Your Open Source Projects | 1 | Oct 7th, 2006 11:00 AM |
| Determine when client socket request has been accepted. | hoffmandirt | Java | 8 | Oct 6th, 2006 9:50 AM |
| Java Socket Timouts in a Chat client/server | krazyshane | Java | 2 | Feb 16th, 2006 10:49 PM |