🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.programmer
Article #438

Re: IP Socket programming with BufferedReader

#438
From: Greg Dickson
Date: Sat, 07 Feb 1998 00:00
42 lines
2332 bytes
Im trying to this sort of thing also try this its got heaps of ideas
http://www.first.gmd.de/persons/leo/java/Telnet
Im after a solution of sending \r and \n as is (not as carriage
returns) to a telnet server but thats another problem that no one
wants to answer
Hope this helps you though
Greg Dickson
witchy@netserv.net.au
Geoffrey L. Goetz wrote in message
<34D808EB.51ECE550@columbus.NOSPAM.rr.com>...
|I am having a problem with implementing the readLine() method of the
|BufferedReader.  I have an IP socket server written in Delphi C/S 3.0
|running on NT and want to send/receive a string of text to/from this
ip
|server with a java client application (not an applet).  This java
|application will eventually be a servlet.  But first I need to get
some
|of the basics of Java based IP programming under control.
|
|The problem is that the readLine() quits once a carriage return
and/or a
|line feed is 'hit'.  So I decided to create a for loop that will
execute
|100 times until an exception is raised which will force an exit.
(BAD
|CODE)  Don't like counting on the exception and I never know if 100
|executions of readLine() will be enough.  The server application
|(Delphi/NT) will close the connection once the data is sent back if
this
|helps...
|
|Any other (GOOD CODE) ways of implementing this?  For the example I
am
|using port 80 on yahoo's web server and sending a request for the
|default page of the server, but my needs are not URL based.  I need
to
|send and receive multiple strings to and from an open ip socket on a
|server (non standard ports).
|
|Thanks!
|-Geoff
Technical Details
Message-ID: <6bicsl$b594@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34D808EB.51ECE550@columbus.NOSPAM.rr.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10a146,ba5f46377b9766a3
X-Google-Attributes: gid10a146,public
X-Google-Thread: f74b3,ba5f46377b9766a3
X-Google-Attributes: gidf74b3,public
From: "Greg Dickson" <witchy@netserv.net.au>
Subject: Re: IP Socket programming with BufferedReader
Date: 1998/02/07
Message-ID: <6bicsl$b594@forums.borland.com>
X-Deja-AN: 322974571
Content-Transfer-Encoding: 7bit
References: <34D808EB.51ECE550@columbus.NOSPAM.rr.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Organization: None
Newsgroups: comp.lang.java.programmer,borland.public.jbuilder.java.language