< prev index next >

src/java.base/share/classes/java/net/SocketImpl.java

Print this page

        

@@ -226,20 +226,38 @@
     protected FileDescriptor getFileDescriptor() {
         return fd;
     }
 
     /**
+     * Sets the value of this socket's {@code fd} field.
+     *
+     * @param fd the value of the fd
+     */
+    protected void setFileDescriptor(FileDescriptor fd) {
+        this.fd = fd;
+    }
+
+    /**
      * Returns the value of this socket's {@code address} field.
      *
      * @return  the value of this socket's {@code address} field.
      * @see     java.net.SocketImpl#address
      */
     protected InetAddress getInetAddress() {
         return address;
     }
 
     /**
+     * Sets the value of this socket's {@code address} field.
+     *
+     * @param address the value of the address
+     */
+    protected void setAddress(InetAddress address) {
+        this.address = address;
+    }
+
+    /**
      * Returns the value of this socket's {@code port} field.
      *
      * @return  the value of this socket's {@code port} field.
      * @see     java.net.SocketImpl#port
      */
< prev index next >