Hi Owen,

I've done the following to unblock an accept() call. Don't know if it works
for InputStream though.

public void run()
{
   socket.accept();
}

public void interrupt()
{
   socket.close();

   // Would still be blocking at accept().
   // Try to make a connection to unblock it.
   Socket s = new Socket(InetAddress.getLocalHost(), port);
   s.close();
}

I don't know how this will translate to InputStream. But I hope this will
help.


Nick


_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl

>From devl-admin at freenetproject.org  Sat Apr 14 11:28:27 2001
Return-Path: <devl-admin at freenetproject.org>
Received: from hawk.freenetproject.org (postfix@[4.18.42.11])
        by funky.danky.com (8.9.3/8.8.7) with ESMTP id LAA22237
        for <danello at danky.com>; Sat, 14 Apr 2001 11:28:25 -0400

Reply via email to