PlainSocketImpl2public class PlainSocketImpl2 extends PlainSocketImpl This class was added so we can create sockets without options that were
needed for server sockets. It just overrides create so that we call new
natives which only set the options required for plain sockets. In order to
preserve behaviour of older versions the create PlainSocketImpl was left as
is and this new class was added. For newer versions an instance of this class
is used, for earlier versions the original PlainSocketImpl is used. |
Constructors Summary |
---|
public PlainSocketImpl2(FileDescriptor fd, int localport, InetAddress addr, int port)
super();
super.fd = fd;
super.localport = localport;
super.address = addr;
super.port = port;
| public PlainSocketImpl2()
super();
| public PlainSocketImpl2(Proxy proxy)creates an instance with specified proxy.
super();
this.proxy = proxy;
|
Methods Summary |
---|
protected void | create(boolean isStreaming)
streaming = isStreaming;
if (isStreaming) {
netImpl.createSocket(fd, NetUtil.preferIPv4Stack());
} else {
netImpl.createDatagramSocket(fd, NetUtil.preferIPv4Stack());
}
|
|