[2182] in java-interest
Datagram socket support in Java
daemon@ATHENA.MIT.EDU (Christopher Lindblad)
Tue Sep 26 16:59:43 1995
Date: Tue, 26 Sep 1995 10:56:49 -0700
From: Christopher Lindblad <cjl@Eng.Sun.COM>
To: java-interest@java.Eng.Sun.COM
I am developing a protocol handler in Java that requires UDP support. My code
needs to create a datagram socket, bind it to a UDP port, and then receive
datagrams.
The class java.net.Socket doesn't provide any mechanism to do what I need to
do (even though java.net.SocketImpl does provide some foundation). It appears
that java.net.Socket is designed with TCP networking in mind, as it is built
upon the notion of "connection" throughout. The only UDP support I can find
is that one can open a socket in datagram mode, but it is still "connected".
I need to have a datagram socket that is "bound", not "connected". The
class sun.net.DatagramSocket would work fine my application, except that it's
not under java.net, so I presume that it won't work in any non-sun Java
implementation.
Is there going to be any real support for datagram network code in java.net?
It would be great if the datagram support in sun.net were migrated to
java.net. This is important to me, and I assume it would be important to
others.
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com