Myriam Abramson wrote:
>
> How do you keep a socket open? In the following threaded code,
> things seemed to
> block unless I close the socket:
>
It looks like your client isn't reading from the
socket. You might consider using a preexisting
framework so you can avoid having to write low
level network code.
One option would be to have the code below in
a servlet, and then use the java.net.URL class
and friends on the client side.
There are some good tutorials on using the
java.net.URL* classes available from Sun's
site.
Learning to use the higher-level java HTTP
classes is easier than learning to program
Sockets, and the speed difference is likely
to be imperceptible if the code example you
gave below is typical of your needs.
-cks
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html