-
Enhancement
-
Resolution: Fixed
-
P3
-
1.2.2
-
beta
-
x86
-
windows_nt
Name: jk109818 Date: 06/26/2000
java version "1.2fcs"
Classic VM (build JDK-1.2fcs-O, native threads)
Java Sockets do not allow you to make a bind to a port without having tio
connect to it, unlike the C++ Socket API which allows you to make Socket binds
without necessarily making a connection to a socket.
There is no simple way to bind to a port in JAVA, without having to write a
whole new implementation of SocketImpl. This is very inflexible, since the
PlainSocketImpl, that is provided with Java already has two functions "bind"
and "connect" that could be called seperately from the Socket class. However,
there are no methods in the Socket class (such as socket.bind() or
socket.connect()) that allow these methods in PlainSocketImpl to be called. The
Socket class calls these methods together, thus causing a bind and a connection
to occur.
It would be a relatively easy change to include a couple of methods in Socket
class that allows binds and connections to be performed seperately.
(Review ID: 106511)
======================================================================
- relates to
-
JDK-4402812 Need to open a socket with timeout
-
- Resolved
-