• Post Reply Bookmark Topic Watch Topic
  • New Topic

is java.net package only tcp based?

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i mean, InetAddress, Socket, URL etc, classes. They are TCP-IP based. For lower levels what should one do?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24213
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java doesn't have direct support for the IP layer or for any hardware.
DatagramSocket supports UDP, but that's about it. If you want to do anything at a lower level, you have to resort to native methods. You can do a Google search on this, and you'll definitely find something, as I know many people have implemented, for example, ICMP in Java via native methods.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Salut Ernest,
I have been investigating myself through the "Java Cookbook" by Ian Darwin for a while. and nowadays I am at the Network Clients. I just would like to get the theory and also why of the things, in addition to the how..
Anyway, Socket seems to be integrated with TCP Protocol.and my mind says it should be protocol independent. (like the servlets: all of the servlets till now have been HTTP Servlets, but of course anybody can write FTP servlets or what so ever. if a vendor supplies the ftp servlet container. Is that the same for the socket?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!