java.net  
Author Message
DigitaluX





PostPosted: 2004-6-14 6:25:00 Top

java-programmer, java.net Hello

How can I get the ip and mac address of the networking device
(eth0)?? is it possible with the InetAddress??

I want to get the ip address given by the ISP.

Sincerly
DigitaluX
 
Roedy Green





PostPosted: 2004-6-14 9:13:00 Top

java-programmer >> java.net On Sun, 13 Jun 2004 22:24:39 GMT, DigitaluX <email***@***.com> wrote
or quoted :

>How can I get the ip and mac address of the networking device
>(eth0)?? is it possible with the InetAddress??

see http://mindprod.com/jgloss/ip.html

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Marcin





PostPosted: 2004-9-24 5:38:00 Top

java-programmer >> java.net Hello,

Does anyone have an idea how can I interrupt
HttpUrlConnection.getInputStream()?

I have 2 threads. First one opens stream using HttpUrlConnection method
getInputStream(). Second one is monitoring transfer in the first thread.
When transfer is below some number second thread tries to interrupt first.
It looks sometimes (in special condition that are caused by me, for
example :I halt internet traffic or do some changes in my proxy
configuration) that getInputStream() method locks and can't be interrupted.
I tried interrupt() method from Thread class, but id doesnn't work.
I tried also to close streams, but it turned out that they were not open
yet.

Is there any technic to take full control over http connection ?

Martin