Article View: borland.public.jbuilder.java.api
Article #790Re: Problem receiving data with a socket client
From: Owen Green
Date: Wed, 23 Oct 2002 14:50
Date: Wed, 23 Oct 2002 14:50
29 lines
2192 bytes
2192 bytes
"Alejandro Guzman" <aeguzmanv@hotmail.com> wrote in message
news:3db6a742$1@newsgroups.borland.com...
>
> Hello everyone, I'm trying to do a socket client application with
Jbuilder 6, this app send information to a server socket (made in
Delphi 6), I don't have problem sending the information, my problem is
receiving the information, because I don't receive the information,
unless I turn off the server socket, and in this moment I receive the
information.. I don't know what wrong, I did several examples that I
found on the internet and all of them give me the same problem.. The
following is the source code:
>
<snip>
> //***** THE APPLICATION FREEZE IN THIS LINE *****//
> mensajeRespuesta = entrada.readLine();
Perhaps the data sent from the server isn't terminated with an EOL
marker (say '\n', or #10 in Delphi speak). This will cause readLine to
block until it hits the end of the stream (i.e. it disconnects).
Try running some tests without the buffered reader (i.e. using the plain
input stream) to examine what data /is/ available, and whether it has a
line terminator.
hth
Owen
Technical Details
Message-ID:
<3db6b731$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newspeer.clara.net!news.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3db6a742$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,d723ab0dfe9ca972 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-10-23 08:26:10 PST From: "Owen Green" <owen@begonefoulmachine.kennulz.demon.co.uk> Newsgroups: borland.public.jbuilder.java.api References: <3db6a742$1@newsgroups.borland.com> Subject: Re: Problem receiving data with a socket client Date: Wed, 23 Oct 2002 15:50:27 +0100 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 62.253.133.165 Message-ID: <3db6b731$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1035384625 62.253.133.165 (23 Oct 2002 07:50:25 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newspeer.clara.net!news.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail