host « Network « Java Network Q&A

Home
Java Network Q&A
1.API
2.bluetooth
3.Client
4.connection
5.Cookie
6.Development
7.Email
8.File
9.ftp
10.http
11.HttpClient
12.https
13.ip
14.Network
15.OS
16.RMI
17.Security
18.Server
19.Socket
20.tcp
21.UDP
22.url
Java Network Q&A » Network » host 

1. What is the quickest way to detect an unreachable host in Java?    stackoverflow.com

I would like the fastest and most accurate function boolean isReachable(String host, int port) that passes the following JUnit tests under the conditions below. Timeout values are specified by the JUnit ...

2. How to get local host address and subnet mask in Java ME?    stackoverflow.com

Is there a way to find those values in ME (Either CDC or CLDC)? All the examples I found used SE methods.

3. Java: Common way to validate and convert "host:port" to InetSocketAddress?    stackoverflow.com

What is the common way in Java to validate and convert a string of the form host:port into an instance of InetSocketAddress? It would be nice if following criteria were met:

  • No address ...

4. Connecting from host to virtual server fails with network unreachable from Java    stackoverflow.com

I have a server that has several virtual machines running on it. I'm trying to connect to one of these servers using Java, but it fails with "Network unreachable". The usecase ...

5. Can InetAddress represent host names that can't be resolved?    stackoverflow.com

I parse various data sources with network information in them. I have been using java.net.InetAddress to represent and parse hosts. It works fine being initialized with IP. I have to parse ...

6. in Java, how do I know if certain port on a host is open??(besides using socket if possible)    stackoverflow.com

freshman, both here and in Java i know codes like:

Socket clientSocket=null;

try   
{   
  clientSocket=new Socket(192.168.2.3,1111);
  System.out.println("port open");   
  clientSocket.close();   
}  ...

7. Unknown host exception    stackoverflow.com

I am running a tomcat web server.
I am using RMI.
When i call the method InetAddress.getLocalHost() it throws exception.

Unknown host: slot12/0:0:0:0:0:0:0:1; nested exception is:
java.net.UnknownHostException: slot12/0:0:0:0:0:0:0:1
java.rmi.UnknownHostException: Unknown host: slot12/0:0:0:0:0:0:0:1; nested exception is:
java.net.UnknownHostException: slot12/0:0:0:0:0:0:0:1
My /etc/hosts entries ...

8. Socket creation with same host    stackoverflow.com

In Java, when creating sockets with the same parameters (ignoring the fact that this code will throw a ConnectException):

Socket s1 = new Socket("127.0.0.1", 7575);
Socket s2 = new Socket("127.0.0.1", 7575);
Is s1 equal ...

9. Can I continue communication after Java host drop    stackoverflow.com

I've created a java client and server application in order to facilitate a multiplayer game. It runs fine, but I'm trying to make my code more robust. If the host quits ...

10. Slash before InetAddress.getByName(host)    stackoverflow.com

How do I remove the slash in the output of InetAddress.getbyName? thanks everyone, i just did it. One Solution would be: String ip_old=myInetaddress.toString(); String ip_new=ip_old.substring(1);

11. Converting an int from host to network format    coderanch.com

I am trying to write a class that first writes the length of a request to a socket in 'network format', and then writes the request (terminated with a null character). I have an example in C, that uses a htonl function. Has anyone else done this sort of thing before?? -John.

12. Any Java Web Hosting Providing Outgoing Network Connection/FTP    coderanch.com

I think all hosting providers support outgoing network connections; at least, I can't think of a reason why they wouldn't. Maybe the free ones don't. Whether or not a package includes an FTP server should be stated in the list of features; again, some of the cheap ones may not have that, but if you're paying USD 10+ per month then ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.